Hoctar77 commited on
Commit
57e33fd
·
verified ·
1 Parent(s): c99c633

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -4
app.py CHANGED
@@ -4,7 +4,7 @@ import os
4
  import re
5
  import json
6
  import time
7
- import textwrap # Added textwrap import
8
  import logging
9
  import traceback
10
  from datetime import datetime
@@ -2360,7 +2360,7 @@ def create_interface():
2360
  <div class="max-w-4xl mx-auto p-4 bg-white rounded-lg shadow-sm mb-6">
2361
  <h1 class="text-2xl font-bold mb-4">Document Check Results Summary</h1>
2362
  <div class="text-lg text-amber-600">
2363
- Found {issues_count} categories of issues that need attention:
2364
  </div>
2365
  </div>
2366
  """
@@ -2422,8 +2422,10 @@ def create_interface():
2422
  <ul class="list-none space-y-2">
2423
  """
2424
  for issue in issues_match[:3]:
 
 
2425
  issues_html_section += f"""
2426
- <li class="text-gray-600 ml-4">• {issue.strip()}</li>
2427
  """
2428
  if len(issues_match) > 3:
2429
  issues_html_section += f"""
@@ -2509,24 +2511,40 @@ def create_interface():
2509
  This tool checks Word documents for compliance with U.S. federal documentation standards and guidelines, including:
2510
 
2511
  - GPO Style Manual requirements
 
2512
  - Federal Register Document Drafting Handbook guidelines
2513
- - FAA Orders:
 
 
2514
  - Plain Language Guidelines per Plain Writing Act of 2010
 
 
2515
 
2516
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">Validation Checks Include:</h2>
2517
  - Required heading structure and organization
 
2518
  - Standard terminology usage
 
2519
  - Proper acronym definitions and usage
 
2520
  - Correct formatting of citations and references
 
2521
  - Consistent date and number formats
 
2522
  - Table and figure caption formatting
 
2523
  - Section symbol usage
 
2524
  - Spacing and punctuation
 
2525
  - Placeholder content detection
 
2526
 
2527
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">How to Use</h2>
2528
  1. Upload your Word document (.docx format)
 
2529
  2. Select the document type
 
2530
  3. Click "Check Document"
2531
 
2532
  > **Note:** Please ensure your document is clean (no track changes or comments)
 
4
  import re
5
  import json
6
  import time
7
+ import textwrap
8
  import logging
9
  import traceback
10
  from datetime import datetime
 
2360
  <div class="max-w-4xl mx-auto p-4 bg-white rounded-lg shadow-sm mb-6">
2361
  <h1 class="text-2xl font-bold mb-4">Document Check Results Summary</h1>
2362
  <div class="text-lg text-amber-600">
2363
+ Found {issues_count} categories of issues that need attention.
2364
  </div>
2365
  </div>
2366
  """
 
2422
  <ul class="list-none space-y-2">
2423
  """
2424
  for issue in issues_match[:3]:
2425
+ # Remove any existing bullet points from the issue text
2426
+ clean_issue = issue.strip().lstrip('•').strip()
2427
  issues_html_section += f"""
2428
+ <li class="text-gray-600 ml-4">• {clean_issue}</li>
2429
  """
2430
  if len(issues_match) > 3:
2431
  issues_html_section += f"""
 
2511
  This tool checks Word documents for compliance with U.S. federal documentation standards and guidelines, including:
2512
 
2513
  - GPO Style Manual requirements
2514
+
2515
  - Federal Register Document Drafting Handbook guidelines
2516
+
2517
+ - FAA Orders
2518
+
2519
  - Plain Language Guidelines per Plain Writing Act of 2010
2520
+
2521
+ - Chicago Manual of Style
2522
 
2523
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">Validation Checks Include:</h2>
2524
  - Required heading structure and organization
2525
+
2526
  - Standard terminology usage
2527
+
2528
  - Proper acronym definitions and usage
2529
+
2530
  - Correct formatting of citations and references
2531
+
2532
  - Consistent date and number formats
2533
+
2534
  - Table and figure caption formatting
2535
+
2536
  - Section symbol usage
2537
+
2538
  - Spacing and punctuation
2539
+
2540
  - Placeholder content detection
2541
+
2542
 
2543
  <h2 style="color: #ea580c; font-size: 1.25rem; font-weight: 600; margin-top: 1rem;">How to Use</h2>
2544
  1. Upload your Word document (.docx format)
2545
+
2546
  2. Select the document type
2547
+
2548
  3. Click "Check Document"
2549
 
2550
  > **Note:** Please ensure your document is clean (no track changes or comments)