Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -329,6 +329,16 @@ def process_document(file_obj, doc_type, template_type):
|
|
| 329 |
# Perform checks
|
| 330 |
heading_valid, headings_found = heading_title_check(doc, required_headings)
|
| 331 |
acronyms_valid, undefined_acronyms = acronym_check(doc)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
|
| 333 |
# Format results
|
| 334 |
results = format_results_for_gradio(
|
|
@@ -336,25 +346,25 @@ def process_document(file_obj, doc_type, template_type):
|
|
| 336 |
headings_found=headings_found,
|
| 337 |
acronyms_valid=acronyms_valid,
|
| 338 |
undefined_acronyms=undefined_acronyms,
|
| 339 |
-
legal_valid=
|
| 340 |
-
incorrect_legal_references=
|
| 341 |
-
table_valid=
|
| 342 |
-
incorrect_captions=
|
| 343 |
-
figure_valid=
|
| 344 |
-
incorrect_fig_captions=
|
| 345 |
-
references_valid=
|
| 346 |
-
incorrect_table_figure_references=
|
| 347 |
-
title_style_valid=
|
| 348 |
-
incorrect_titles=
|
| 349 |
required_headings=required_headings,
|
| 350 |
doc_type=doc_type,
|
| 351 |
-
double_period_valid=
|
| 352 |
-
incorrect_sentences=
|
| 353 |
-
spacing_valid=
|
| 354 |
-
incorrect_spacing=
|
| 355 |
-
abbreviation_issues=
|
| 356 |
-
date_issues=
|
| 357 |
-
placeholder_issues=
|
| 358 |
)
|
| 359 |
|
| 360 |
return results
|
|
|
|
| 329 |
# Perform checks
|
| 330 |
heading_valid, headings_found = heading_title_check(doc, required_headings)
|
| 331 |
acronyms_valid, undefined_acronyms = acronym_check(doc)
|
| 332 |
+
legal_valid, incorrect_legal_references = legal_check(doc) # Replace placeholder
|
| 333 |
+
table_valid, incorrect_captions = table_caption_check(doc, doc_type) # Replace placeholder
|
| 334 |
+
figure_valid, incorrect_fig_captions = figure_caption_check(doc, doc_type) # Replace placeholder
|
| 335 |
+
references_valid, incorrect_table_figure_references = table_figure_reference_check(doc, doc_type) # Replace placeholder
|
| 336 |
+
title_style_valid, incorrect_titles = document_title_check(doc, doc_type) # Replace placeholder
|
| 337 |
+
double_period_valid, incorrect_sentences = double_period_check(doc) # Replace placeholder
|
| 338 |
+
spacing_valid, incorrect_spacing = spacing_check(doc) # Replace placeholder
|
| 339 |
+
abbreviation_issues = check_abbreviation_usage(doc) # Replace placeholder
|
| 340 |
+
date_issues = check_date_formats(doc) # Replace placeholder
|
| 341 |
+
placeholder_issues = check_placeholders(doc) # Replace placeholder
|
| 342 |
|
| 343 |
# Format results
|
| 344 |
results = format_results_for_gradio(
|
|
|
|
| 346 |
headings_found=headings_found,
|
| 347 |
acronyms_valid=acronyms_valid,
|
| 348 |
undefined_acronyms=undefined_acronyms,
|
| 349 |
+
legal_valid=legal_valid,
|
| 350 |
+
incorrect_legal_references=incorrect_legal_references,
|
| 351 |
+
table_valid=table_valid,
|
| 352 |
+
incorrect_captions=incorrect_captions,
|
| 353 |
+
figure_valid=figure_valid,
|
| 354 |
+
incorrect_fig_captions=incorrect_fig_captions,
|
| 355 |
+
references_valid=references_valid,
|
| 356 |
+
incorrect_table_figure_references=incorrect_table_figure_references,
|
| 357 |
+
title_style_valid=title_style_valid,
|
| 358 |
+
incorrect_titles=incorrect_titles,
|
| 359 |
required_headings=required_headings,
|
| 360 |
doc_type=doc_type,
|
| 361 |
+
double_period_valid=double_period_valid,
|
| 362 |
+
incorrect_sentences=incorrect_sentences,
|
| 363 |
+
spacing_valid=spacing_valid,
|
| 364 |
+
incorrect_spacing=incorrect_spacing,
|
| 365 |
+
abbreviation_issues=abbreviation_issues,
|
| 366 |
+
date_issues=date_issues,
|
| 367 |
+
placeholder_issues=placeholder_issues
|
| 368 |
)
|
| 369 |
|
| 370 |
return results
|