Update app.py
Browse files
app.py
CHANGED
|
@@ -482,12 +482,12 @@ def eval():
|
|
| 482 |
if question_path.endswith('.pdf'):
|
| 483 |
question_text = extract_text_from_pdf(question_path)
|
| 484 |
else:
|
| 485 |
-
question_text =
|
| 486 |
|
| 487 |
if answer_path.endswith('.pdf'):
|
| 488 |
answer_text = extract_text_from_pdf(answer_path)
|
| 489 |
else:
|
| 490 |
-
answer_text =
|
| 491 |
|
| 492 |
elif input_type == 'text':
|
| 493 |
question_text = request.form['question_text']
|
|
|
|
| 482 |
if question_path.endswith('.pdf'):
|
| 483 |
question_text = extract_text_from_pdf(question_path)
|
| 484 |
else:
|
| 485 |
+
question_text = perform_ocr(question_path)
|
| 486 |
|
| 487 |
if answer_path.endswith('.pdf'):
|
| 488 |
answer_text = extract_text_from_pdf(answer_path)
|
| 489 |
else:
|
| 490 |
+
answer_text = perform_ocr(answer_path)
|
| 491 |
|
| 492 |
elif input_type == 'text':
|
| 493 |
question_text = request.form['question_text']
|