Spaces:
Sleeping
Sleeping
Commit
·
c290ebd
1
Parent(s):
2e50c21
Update code files
Browse files
app.py
CHANGED
@@ -60,8 +60,8 @@ def post_process_text(text):
|
|
60 |
|
61 |
def ocr(image):
|
62 |
queries = [
|
63 |
-
"Extract and transcribe all the text visible in the image, including any small or partially visible text.",
|
64 |
-
|
65 |
# "What text can you identify in this image? Include everything, even if it's partially obscured or in the background."
|
66 |
]
|
67 |
|
@@ -73,7 +73,7 @@ def ocr(image):
|
|
73 |
# Combine and deduplicate the results
|
74 |
final_text = "\n".join(set(all_extracted_text))
|
75 |
|
76 |
-
final_text = post_process_text(final_text)
|
77 |
return final_text
|
78 |
|
79 |
|
|
|
60 |
|
61 |
def ocr(image):
|
62 |
queries = [
|
63 |
+
# "Extract and transcribe all the text visible in the image, including any small or partially visible text.",
|
64 |
+
"Look closely at the image and list any text you see, no matter how small or unclear.",
|
65 |
# "What text can you identify in this image? Include everything, even if it's partially obscured or in the background."
|
66 |
]
|
67 |
|
|
|
73 |
# Combine and deduplicate the results
|
74 |
final_text = "\n".join(set(all_extracted_text))
|
75 |
|
76 |
+
# final_text = post_process_text(final_text)
|
77 |
return final_text
|
78 |
|
79 |
|