Skip to content

AN OCR AND MULTILINGUAL MACHINE TRANSLATOR USING 🤗HUGGING FACE. Upload a high quality image with proper font and get the required TRANSLATIONS.

License

Notifications You must be signed in to change notification settings

NAVANEETHELITE/MBART_50_STREAMLIT_TRANSLATOR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBART_50_STREAMLIT_TRANSLATOR

  • AN OCR AND MULTILINGUAL MACHINE TRANSLATOR USING 🤗HUGGING FACE

  • Found an image with unknown language?? Use my application to extract text from it and translate.
  • Upload a high quality image with proper font and get the required TRANSLATIONS.

REQUIREMENTS:

  • python 3.7+
  • pytorch == 1.9.0
  • streamlit == 0.86.0

CREATING VENV IN CONDA:

conda create --name myenv

Using a virtual environment:

conda activate myenv

Deactivating a virtual environment:

conda deactivate myenv

INSTALLING DEPENDENCIES:

PYTORCH FOR CUDA 10.2:

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

PYTORCH - CPU ONLY VERSION:

conda install pytorch torchvision torchaudio cpuonly -c pytorch

HUGGING FACE TRANSFORMERS 🤗:

pip install transformers

STREAMLIT:

pip install streamlit == 0.86.0

RUNNING THE APPLICATION:

run :

streamlit run app.py
  • Jump to http://localhost:8501
  • Your app will be hosted in the local server.
  • Then deploy the app to cloud platforms but in our case, the free tier versions of Heroku and Streamlit Sharing won't handle whole 2.4GB pre-trained model (MBART-50).
  • The home and the output pages of the web app is shown below:
index
Translated
Translated

About

AN OCR AND MULTILINGUAL MACHINE TRANSLATOR USING 🤗HUGGING FACE. Upload a high quality image with proper font and get the required TRANSLATIONS.

Topics

Resources

License

Stars

Watchers

Forks