Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,6 +26,7 @@ def inference(img, lang):
|
|
| 26 |
for d in data:
|
| 27 |
if ("عفو" in d) or ("عذر" in d) or ("لا يوجد" in d) or ("من فضلك" in d) or ("رمز" in d) :
|
| 28 |
letter = d
|
|
|
|
| 29 |
return ['result.jpg', letter]
|
| 30 |
|
| 31 |
title = 'سحب النصوص من الصور (خاص في تطبيقات أبشر)'
|
|
@@ -40,7 +41,7 @@ choices = [
|
|
| 40 |
]
|
| 41 |
gr.Interface(
|
| 42 |
inference,
|
| 43 |
-
[gr.inputs.Image(type='filepath', label='Input'),gr.inputs.CheckboxGroup(choices, type="value", default=['
|
| 44 |
[gr.outputs.Image(type='filepath', label='Output').style(height=400, width=400), gr.outputs.Textbox( type="text", label="الخطأ المستخرج من الصورة: ")],
|
| 45 |
title=title,
|
| 46 |
description=description,
|
|
|
|
| 26 |
for d in data:
|
| 27 |
if ("عفو" in d) or ("عذر" in d) or ("لا يوجد" in d) or ("من فضلك" in d) or ("رمز" in d) :
|
| 28 |
letter = d
|
| 29 |
+
break
|
| 30 |
return ['result.jpg', letter]
|
| 31 |
|
| 32 |
title = 'سحب النصوص من الصور (خاص في تطبيقات أبشر)'
|
|
|
|
| 41 |
]
|
| 42 |
gr.Interface(
|
| 43 |
inference,
|
| 44 |
+
[gr.inputs.Image(type='filepath', label='Input'),gr.inputs.CheckboxGroup(choices, type="value", default=['ar'], label='language')],
|
| 45 |
[gr.outputs.Image(type='filepath', label='Output').style(height=400, width=400), gr.outputs.Textbox( type="text", label="الخطأ المستخرج من الصورة: ")],
|
| 46 |
title=title,
|
| 47 |
description=description,
|