-
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.
- python 3.7+
- pytorch == 1.9.0
- streamlit == 0.86.0
conda create --name myenv
Using a virtual environment:
conda activate myenv
Deactivating a virtual environment:
conda deactivate myenv
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
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: