Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,8 @@ def ocr_image(image, language):
|
|
| 13 |
return "Please upload an image."
|
| 14 |
lang = '+'.join(language)
|
| 15 |
text = pytesseract.image_to_string(image, lang=lang)
|
| 16 |
-
return text.strip()
|
|
|
|
| 17 |
|
| 18 |
# Translation function
|
| 19 |
def translate_text(text, direction):
|
|
|
|
| 13 |
return "Please upload an image."
|
| 14 |
lang = '+'.join(language)
|
| 15 |
text = pytesseract.image_to_string(image, lang=lang)
|
| 16 |
+
return f"OCR Text of the image:\n\n{text.strip()}"
|
| 17 |
+
|
| 18 |
|
| 19 |
# Translation function
|
| 20 |
def translate_text(text, direction):
|