musadac commited on
Commit
36debf9
1 Parent(s): be1456b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -76,7 +76,10 @@ tokenizer = MBartTokenizer.from_pretrained(
76
  'facebook/mbart-large-50'
77
  )
78
  processortext2 = CustomOCRProcessor(image_processor,tokenizer)
 
79
 
 
 
80
  st.title("Image OCR with musadac/vilanocr")
81
  uploaded_file = st.file_uploader("Choose an image", type=["jpg", "jpeg", "png"])
82
 
 
76
  'facebook/mbart-large-50'
77
  )
78
  processortext2 = CustomOCRProcessor(image_processor,tokenizer)
79
+ import os
80
 
81
+ huggingface_token = os.environ.get("HUGGINGFACE_TOKEN")
82
+ model2 = VisionEncoderDecoderModel.from_pretrained("musadac/vilanocr-single-urdu", use_auth_token=huggingface_token)
83
  st.title("Image OCR with musadac/vilanocr")
84
  uploaded_file = st.file_uploader("Choose an image", type=["jpg", "jpeg", "png"])
85