Spaces:
Runtime error
Runtime error
ahmadtalha
commited on
Commit
•
60bb5b0
1
Parent(s):
5a7e139
Update app.py
Browse files
app.py
CHANGED
@@ -73,9 +73,9 @@ def process_input(image=None, file=None, audio=None, text=""):
|
|
73 |
if image is not None:
|
74 |
ocr_prediction = ocr_processor.process_image(image)
|
75 |
# gettig text from ocr object
|
76 |
-
for idx in range(len((list(ocr_prediction
|
77 |
final_text += " "
|
78 |
-
final_text += list((list(ocr_prediction
|
79 |
# final_text += "\n" + ocr_processor.process_image(image)
|
80 |
print(final_text)
|
81 |
if file is not None:
|
|
|
73 |
if image is not None:
|
74 |
ocr_prediction = ocr_processor.process_image(image)
|
75 |
# gettig text from ocr object
|
76 |
+
for idx in range(len((list(ocr_prediction)[0][1]))):
|
77 |
final_text += " "
|
78 |
+
final_text += list((list(ocr_prediction)[0][1])[idx])[1][1]
|
79 |
# final_text += "\n" + ocr_processor.process_image(image)
|
80 |
print(final_text)
|
81 |
if file is not None:
|