Hoctar77 commited on
Commit
add52df
Β·
verified Β·
1 Parent(s): 2163e95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -5
app.py CHANGED
@@ -2351,12 +2351,15 @@ def create_interface():
2351
  header = sections[0].strip()
2352
  issues = sections[1:]
2353
 
 
 
 
 
2354
  # Format header
2355
  header_html = f"""
2356
  <div class="max-w-4xl mx-auto p-4 bg-white rounded-lg shadow-sm mb-6">
2357
- <h1 class="text-2xl font-bold text-gray-800 mb-4">Document Check Results Summary</h1>
2358
  <div class="text-lg {'text-green-600' if 'All checks passed' in header else 'text-amber-600'}">
2359
- {header.strip()}
2360
  </div>
2361
  </div>
2362
  """
@@ -2395,10 +2398,16 @@ def create_interface():
2395
  <div class="space-y-2 ml-4">
2396
  <div class="text-red-600">
2397
  <span class="inline-block w-4">❌</span>
 
 
 
2398
  {incorrect.group(1).strip()}
2399
  </div>
2400
  <div class="text-green-600">
2401
  <span class="inline-block w-4">βœ“</span>
 
 
 
2402
  {correct.group(1).strip()}
2403
  </div>
2404
  </div>
@@ -2497,10 +2506,26 @@ def create_interface():
2497
  with gr.Blocks() as demo:
2498
  gr.Markdown(
2499
  """
2500
- # πŸ“‘ Document Checker Tool
2501
 
2502
  ### Purpose
2503
- This tool checks Word documents for compliance with U.S. federal documentation standards.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2504
 
2505
  ### How to Use
2506
  1. Upload your Word document (.docx format)
@@ -2588,7 +2613,9 @@ def create_interface():
2588
  gr.Markdown(
2589
  """
2590
  ### πŸ“Œ Important Notes
2591
- - This tool is in development; you may encounter false positives
 
 
2592
  - For questions or feedback, contact Eric Putnam
2593
  - Results are not stored or saved
2594
  """
 
2351
  header = sections[0].strip()
2352
  issues = sections[1:]
2353
 
2354
+ # Extract the number of issues from the header text
2355
+ issues_count_match = re.search(r'Found (\d+) categories', header)
2356
+ issues_count = issues_count_match.group(1) if issues_count_match else len(issues)
2357
+
2358
  # Format header
2359
  header_html = f"""
2360
  <div class="max-w-4xl mx-auto p-4 bg-white rounded-lg shadow-sm mb-6">
 
2361
  <div class="text-lg {'text-green-600' if 'All checks passed' in header else 'text-amber-600'}">
2362
+ Found {issues_count} categories of issues that need attention:
2363
  </div>
2364
  </div>
2365
  """
 
2398
  <div class="space-y-2 ml-4">
2399
  <div class="text-red-600">
2400
  <span class="inline-block w-4">❌</span>
2401
+ Incorrect:
2402
+ </div>
2403
+ <div class="text-red-600 ml-8">
2404
  {incorrect.group(1).strip()}
2405
  </div>
2406
  <div class="text-green-600">
2407
  <span class="inline-block w-4">βœ“</span>
2408
+ Correct:
2409
+ </div>
2410
+ <div class="text-green-600 ml-8">
2411
  {correct.group(1).strip()}
2412
  </div>
2413
  </div>
 
2506
  with gr.Blocks() as demo:
2507
  gr.Markdown(
2508
  """
2509
+ # πŸ“‘ FAA Document Checker Tool
2510
 
2511
  ### Purpose
2512
+ This tool checks Word documents for compliance with U.S. federal documentation standards and guidelines, including:
2513
+
2514
+ - GPO Style Manual requirements
2515
+ - Federal Register Document Drafting Handbook guidelines
2516
+ - FAA Orders:
2517
+ - Plain Language Guidelines per Plain Writing Act of 2010
2518
+
2519
+ ### Validation Checks Include:
2520
+ - Required heading structure and organization
2521
+ - Standard terminology usage
2522
+ - Proper acronym definitions and usage
2523
+ - Correct formatting of citations and references
2524
+ - Consistent date and number formats
2525
+ - Table and figure caption formatting
2526
+ - Section symbol usage
2527
+ - Spacing and punctuation
2528
+ - Placeholder content detection
2529
 
2530
  ### How to Use
2531
  1. Upload your Word document (.docx format)
 
2613
  gr.Markdown(
2614
  """
2615
  ### πŸ“Œ Important Notes
2616
+ - This tool helps ensure compliance with federal documentation standards
2617
+ - Results are based on current style guides and FAA requirements
2618
+ - The tool provides suggestions but final editorial decisions rest with the document author
2619
  - For questions or feedback, contact Eric Putnam
2620
  - Results are not stored or saved
2621
  """