Spaces:
Build error
Build error
Commit
·
d8630dd
1
Parent(s):
d31ea2d
Update app.py
Browse files
app.py
CHANGED
@@ -488,7 +488,7 @@ def run_generate_questions(document_name, output_file, questions_file, delimiter
|
|
488 |
if doc.paragraphs[0].text in list(input_output_qg.keys()):
|
489 |
qg_output = input_output_qg[doc.paragraphs[0].text]
|
490 |
q_output = extract_questions(qg_output, questions_file)
|
491 |
-
time.sleep(
|
492 |
return qg_output, q_output
|
493 |
if source_language != 'english':
|
494 |
translation_output = translate_fill(document_name, "qg_translation.docx", source_language , "english")
|
@@ -524,7 +524,7 @@ def run_redflags(filename, output_file):
|
|
524 |
for i in range(len(inline)):
|
525 |
inline[i].font.color.rgb = RGBColor(255, 000, 000)
|
526 |
|
527 |
-
time.sleep(
|
528 |
doc.save(output_file)
|
529 |
return output_file
|
530 |
|
@@ -596,7 +596,7 @@ def run_extract_info(document_name, context, output_file, source_language):
|
|
596 |
if doc.paragraphs[0].text in list(input_output_exin.keys()):
|
597 |
exin_output = input_output_exin[doc.paragraphs[0].text]
|
598 |
exin_unanswered = extract_questions_for_info(exin_output)
|
599 |
-
time.sleep(
|
600 |
return exin_output, exin_unanswered
|
601 |
else:
|
602 |
if source_language != 'english':
|
|
|
488 |
if doc.paragraphs[0].text in list(input_output_qg.keys()):
|
489 |
qg_output = input_output_qg[doc.paragraphs[0].text]
|
490 |
q_output = extract_questions(qg_output, questions_file)
|
491 |
+
time.sleep(2)
|
492 |
return qg_output, q_output
|
493 |
if source_language != 'english':
|
494 |
translation_output = translate_fill(document_name, "qg_translation.docx", source_language , "english")
|
|
|
524 |
for i in range(len(inline)):
|
525 |
inline[i].font.color.rgb = RGBColor(255, 000, 000)
|
526 |
|
527 |
+
time.sleep(2)
|
528 |
doc.save(output_file)
|
529 |
return output_file
|
530 |
|
|
|
596 |
if doc.paragraphs[0].text in list(input_output_exin.keys()):
|
597 |
exin_output = input_output_exin[doc.paragraphs[0].text]
|
598 |
exin_unanswered = extract_questions_for_info(exin_output)
|
599 |
+
time.sleep(2)
|
600 |
return exin_output, exin_unanswered
|
601 |
else:
|
602 |
if source_language != 'english':
|