Spaces:
Runtime error
Runtime error
TomatoFT
commited on
Commit
•
540536e
1
Parent(s):
70cc264
Fix: Debuging in the app code
Browse files
app.py
CHANGED
@@ -9,9 +9,9 @@ def translate_text(text, src_lang='en', dest_lang='vi'):
|
|
9 |
translation = translator.translate(text)
|
10 |
return translation
|
11 |
|
12 |
-
def process_image(
|
13 |
# Convert the uploaded image data to a PIL Image
|
14 |
-
image = Image.open(
|
15 |
|
16 |
# Sample code to perform OCR and draw translated text (replace with your logic)
|
17 |
# Simulated results for demonstration purposes
|
|
|
9 |
translation = translator.translate(text)
|
10 |
return translation
|
11 |
|
12 |
+
def process_image(image):
|
13 |
# Convert the uploaded image data to a PIL Image
|
14 |
+
image = Image.open(image).convert('RGB')
|
15 |
|
16 |
# Sample code to perform OCR and draw translated text (replace with your logic)
|
17 |
# Simulated results for demonstration purposes
|