Skip to content

ParamThakkar123/Text-Extraction-and-RAG-using-OCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Text-Extraction-and-RAG-using-OCR

This project focuses on extracting text from images using Optical Character Recognition (OCR) and leveraging a Retrieval-Augmented Generation (RAG) model for searching relevant sentences related to a keyword. The model utilized in this application is Qwen2VL-2B-Instruct.

Dependencies

The following libraries are required for this project:

  • transformers
  • qwen_vl_utils
  • pillow
  • streamlit
  • flash-attn

Setup Instructions

To set up the environment and install the necessary dependencies, run the following commands:

pip install -q git+https://github.com/huggingface/transformers.git qwen-vl-utils flash-attn
pip install streamlit -q

Run the application

in the command line enter :

streamlit run app.py

Screenshots

image

image

image

Hindi :

image

JSON output : { "text": "चलने वाले पैरों में कितना फर्क होता है एक आगे तो एक पीछे लेकिन न कभी आगे वाले को अभिमान होता है, और न ही पीछे वाले का अपमान क्योंकि उन्हें पता होता है कि कुछ ही समय में स्थिति बदलने वाली है इसी को जीवन कहते हैं,", "author": "RPSharma" }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages