Skip to content

Conversation

@lionellite
Copy link

Integrates a Llama4-compatible model (using ChatGoogleGenerativeAI with a Gemini model as a proxy) for PDF and image querying. Replaces OpenAI dependencies with Google's generative AI and HuggingFace embeddings.

Key changes:

  • Modified pdfquery.py to use ChatGoogleGenerativeAI and HuggingFaceEmbeddings.
  • Updated API key handling from OpenAI to Google.
  • Enhanced pdfquery.py to process PNG and JPG image files using UnstructuredImageLoader and Tesseract OCR for text extraction.
  • Updated streamlitui.py to accept Google API keys and allow uploading of PDF and image files (PNG, JPG, JPEG).
  • Updated requirements.txt to include langchain-google-genai, sentence-transformers, pytesseract, and Pillow, and commented out openai.
  • Tesseract OCR engine installation is handled during image processing.

Further manual testing is recommended to ensure full functionality of the Streamlit application, API interactions, and OCR accuracy.

Integrates a Llama4-compatible model (using ChatGoogleGenerativeAI with a Gemini model as a proxy) for PDF and image querying. Replaces OpenAI dependencies with Google's generative AI and HuggingFace embeddings.

Key changes:
- Modified `pdfquery.py` to use `ChatGoogleGenerativeAI` and `HuggingFaceEmbeddings`.
- Updated API key handling from OpenAI to Google.
- Enhanced `pdfquery.py` to process PNG and JPG image files using `UnstructuredImageLoader` and Tesseract OCR for text extraction.
- Updated `streamlitui.py` to accept Google API keys and allow uploading of PDF and image files (PNG, JPG, JPEG).
- Updated `requirements.txt` to include `langchain-google-genai`, `sentence-transformers`, `pytesseract`, and `Pillow`, and commented out `openai`.
- Tesseract OCR engine installation is handled during image processing.

Further manual testing is recommended to ensure full functionality of the Streamlit application, API interactions, and OCR accuracy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant