This is a Streamlit web application that utilizes Google's Generative AI model to extract information from invoices uploaded as images. It allows users to input a prompt and upload an invoice image, and then generates a response based on the uploaded image and the input prompt.
To run this application locally, follow these steps:
- Clone this repository to your local machine.
- Install the required dependencies using
pip install -r requirements.txt
. - Create a
.env
file in the root directory of the project and add your Google API key. You can obtain an API key from the Google Cloud Console. - Run the Streamlit app using
streamlit run app.py
. - Access the application in your web browser at
http://localhost:8501
.
- Upon accessing the application, you'll see a text input field where you can provide a prompt.
- Upload an image of an invoice using the provided file uploader.
- Click on the "Talk to me" button to generate a response based on the uploaded image and input prompt.
- The generated response will be displayed below the button.
- Streamlit: 0.89.0
- Pillow: 9.0.0
- google-generativeai: (version compatible with your Google API key)
- dotenv: 0.19.5
app.py
: Main Streamlit application file.requirements.txt
: List of Python dependencies..env
: Environment file for storing sensitive information (e.g., API keys).