Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ path = os.system("which tesseract >> path.txt")
|
|
26 |
with open("path.txt", 'r') as file:
|
27 |
tesseract_path = file.read().replace('\n', '')
|
28 |
|
29 |
-
|
30 |
########### TAB 1 (UPLOAD) FUNCTIONS #############################
|
31 |
|
32 |
def print_files(files):
|
@@ -41,7 +41,7 @@ def create_data(files):
|
|
41 |
for file in files:
|
42 |
if file.name.endswith('png') or file.name.endswith('.jpg'):
|
43 |
try:
|
44 |
-
question_context += (pytesseract.image_to_string(Image.open(file.name)
|
45 |
except Exception as e:
|
46 |
print(e)
|
47 |
pass
|
|
|
26 |
with open("path.txt", 'r') as file:
|
27 |
tesseract_path = file.read().replace('\n', '')
|
28 |
|
29 |
+
print(tesseract_path)
|
30 |
########### TAB 1 (UPLOAD) FUNCTIONS #############################
|
31 |
|
32 |
def print_files(files):
|
|
|
41 |
for file in files:
|
42 |
if file.name.endswith('png') or file.name.endswith('.jpg'):
|
43 |
try:
|
44 |
+
question_context += (pytesseract.image_to_string(Image.open(file.name))) + '\n\n'
|
45 |
except Exception as e:
|
46 |
print(e)
|
47 |
pass
|