Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ def print_files(files):
|
|
68 |
def create_data(files, language_selection):
|
69 |
question_context = ''
|
70 |
for file in files:
|
71 |
-
if file.name.endswith('png') or file.name.endswith('.jpg'):
|
72 |
try:
|
73 |
question_context += (pytesseract.image_to_string(Image.open(file.name), lang=lang_mapping[language_selection])) + '\n\n'
|
74 |
except Exception as e:
|
|
|
68 |
def create_data(files, language_selection):
|
69 |
question_context = ''
|
70 |
for file in files:
|
71 |
+
if file.name.endswith('png') or file.name.endswith('.jpg') or file.name.endswith('.jpeg'):
|
72 |
try:
|
73 |
question_context += (pytesseract.image_to_string(Image.open(file.name), lang=lang_mapping[language_selection])) + '\n\n'
|
74 |
except Exception as e:
|