Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ def process(image: str, lang: str = 'eng') -> str:
|
|
10 |
except Exception as e:
|
11 |
return str(e)
|
12 |
|
13 |
-
|
14 |
|
15 |
interface = gr.Interface(
|
16 |
process,
|
17 |
-
[gr.Image(type="filepath"), gr.Dropdown(label="Select Language", choices=
|
18 |
outputs="text",
|
19 |
css="footer {visibility: hidden}",
|
20 |
title="Optical Character Recognition | Image To Text",
|
|
|
10 |
except Exception as e:
|
11 |
return str(e)
|
12 |
|
13 |
+
langs = pytesseract.get_languages()
|
14 |
|
15 |
interface = gr.Interface(
|
16 |
process,
|
17 |
+
[gr.Image(type="filepath"), gr.Dropdown(label="Select Language", choices=langs, type="value")],
|
18 |
outputs="text",
|
19 |
css="footer {visibility: hidden}",
|
20 |
title="Optical Character Recognition | Image To Text",
|