Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -244,9 +244,24 @@ def detect(img, target_lang,trans_lang,ocr_sens,font_fac,target_lang2=None):
|
|
244 |
return im_out,blr_out,pd.DataFrame(bounds),pd.DataFrame(bounds).iloc[:,1:]
|
245 |
|
246 |
with gr.Blocks() as robot:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
with gr.Row():
|
248 |
with gr.Column():
|
249 |
-
im=gr.Image(type="filepath")
|
250 |
|
251 |
with gr.Column():
|
252 |
with gr.Group():
|
|
|
244 |
return im_out,blr_out,pd.DataFrame(bounds),pd.DataFrame(bounds).iloc[:,1:]
|
245 |
|
246 |
with gr.Blocks() as robot:
|
247 |
+
gr.Markdown("""<h1><center>Translate Image to Image</center></h1><h4><center>EasyOCR and facebook/m2m100_1.2B</center></h4><h7><center>*translation may not be accurate</center></h7>""")
|
248 |
+
with gr.Accordion(label="Description",open=False):
|
249 |
+
with gr.Row():
|
250 |
+
gr.Markdown("""<p> Drop your image in the "Image to Translate" Box<br>
|
251 |
+
Select the Language to Detect in the Image<br>
|
252 |
+
Select the Language to Translate to<br>
|
253 |
+
Click "Go" Button </p>""")
|
254 |
+
gr.Markdown("""<p> Translation Model: <a href="https://huggingface.co/facebook/m2m100_1.2B">facebook/m2m100_1.2B</a><br>
|
255 |
+
OCR: <a href="https://www.jaided.ai/easyocr">easyocr</a><br>
|
256 |
+
Influence by:<br>
|
257 |
+
<a href="https://huggingface.co/spaces/venz/AW-05-GR-NLP-Image2Text-Multilingual-OCR">venz/AW-05-GR-NLP-Image2Text-Multilingual-OCR</a><br>
|
258 |
+
<a href="https://huggingface.co/spaces/Iker/Translate-100-languages">Iker/Translate-100-languages</a><br>
|
259 |
+
</p>""")
|
260 |
+
|
261 |
+
|
262 |
with gr.Row():
|
263 |
with gr.Column():
|
264 |
+
im=gr.Image(label="Image to Translate",type="filepath")
|
265 |
|
266 |
with gr.Column():
|
267 |
with gr.Group():
|