A Streamlit application to extract and understand information from invoice images using Google's Generative AI.
- Upload invoice images in JPG, JPEG, or PDF format.
- Extract and answer questions based on the uploaded invoice image using Gemini Pro Vision.
- Python 3.7+
- Streamlit
- python-dotenv
- Pillow (PIL)
- google-generativeai
-
Clone the repository:
git clone https://github.com/yourusername/multilanguage-invoice-extractor.git cd multilanguage-invoice-extractor
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the project root directory and add your Google API key:GOOGLE_API_KEY=your_google_api_key
-
Run the Streamlit application:
streamlit run app.py
-
Open your web browser and go to
http://localhost:8501
. -
Upload an invoice image and input your prompt to get the response based on the uploaded invoice image.
├── app.py
├── requirements.txt
├── .env
└── README.md
app.py
: Main application file containing the Streamlit app code.requirements.txt
: List of dependencies required for the project..env
: Environment file to store the Google API key.README.md
: Project documentation.