heoliday commited on
Commit
74fbd58
Β·
verified Β·
1 Parent(s): b1588fd

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -30
app.py CHANGED
@@ -496,7 +496,7 @@ def validate_tin_sequential(first_name: str, middle_name: str, last_name: str,
496
  def create_interface():
497
  with gr.Blocks(title="TIN Validator - Updated", theme=gr.themes.Soft()) as demo:
498
  gr.Markdown("""
499
- # πŸ†” Philippine TIN Validator (Updated for 2024)
500
  ### Validate Tax Identification Numbers using the official BIR system
501
 
502
  This tool has been updated to work with the current BIR validation system.
@@ -516,8 +516,8 @@ def create_interface():
516
  )
517
 
518
  middle_name = gr.Textbox(
519
- label="Middle Name",
520
- placeholder="Santos *",
521
  info="Leave blank if you don't have a middle name"
522
  )
523
 
@@ -619,36 +619,36 @@ def create_interface():
619
  outputs=[progress_output, summary_output, results_table]
620
  )
621
 
622
- # Example usage
623
- gr.Markdown("### πŸ“‹ Example Input")
624
- gr.Examples(
625
- examples=[
626
- ["Juan", "Santos", "Dela Cruz", "123456789", "01-15-1990", "Male"],
627
- ["Maria", "Carmen", "Rodriguez", "987654321", "12-25-1985", "Female"],
628
- ["Jose", "", "Rizal", "111222333", "06-19-1861", "Male"],
629
- ],
630
- inputs=[first_name, middle_name, last_name, tin_id, birthdate, gender],
631
- )
632
 
633
- gr.Markdown("""
634
- ### πŸ”§ How it Works:
635
- 1. **Connects to BIR System** - Uses the official validation endpoint
636
- 2. **Tests Name Variations** - Tries different formatting combinations
637
- 3. **JSON Response Parsing** - Analyzes the server's response properly
638
- 4. **Sequential Processing** - One request at a time with delays
639
 
640
- ### πŸ“‹ Input Tips:
641
- - **TIN**: Enter exactly 9 digits (remove hyphens)
642
- - **Names**: Use the exact spelling from your registration
643
- - **Date**: MM-DD-YYYY format works best
644
- - **Patience**: Process takes 2-5 minutes due to rate limiting
645
 
646
- ### ⚠️ Troubleshooting:
647
- - If validation fails, check your TIN and personal information
648
- - Ensure birthdate is in correct format
649
- - Verify name spelling matches your BIR registration
650
- - Try again if server is temporarily unavailable
651
- """)
652
 
653
  return demo
654
 
 
496
  def create_interface():
497
  with gr.Blocks(title="TIN Validator - Updated", theme=gr.themes.Soft()) as demo:
498
  gr.Markdown("""
499
+ # πŸ†” Philippine TIN Validator (AAI Data Operation Team)
500
  ### Validate Tax Identification Numbers using the official BIR system
501
 
502
  This tool has been updated to work with the current BIR validation system.
 
516
  )
517
 
518
  middle_name = gr.Textbox(
519
+ label="Middle Name *",
520
+ placeholder="Santos",
521
  info="Leave blank if you don't have a middle name"
522
  )
523
 
 
619
  outputs=[progress_output, summary_output, results_table]
620
  )
621
 
622
+ # # Example usage
623
+ # gr.Markdown("### πŸ“‹ Example Input")
624
+ # gr.Examples(
625
+ # examples=[
626
+ # ["Juan", "Santos", "Dela Cruz", "123456789", "01-15-1990", "Male"],
627
+ # ["Maria", "Carmen", "Rodriguez", "987654321", "12-25-1985", "Female"],
628
+ # ["Jose", "", "Rizal", "111222333", "06-19-1861", "Male"],
629
+ # ],
630
+ # inputs=[first_name, middle_name, last_name, tin_id, birthdate, gender],
631
+ # )
632
 
633
+ # gr.Markdown("""
634
+ # ### πŸ”§ How it Works:
635
+ # 1. **Connects to BIR System** - Uses the official validation endpoint
636
+ # 2. **Tests Name Variations** - Tries different formatting combinations
637
+ # 3. **JSON Response Parsing** - Analyzes the server's response properly
638
+ # 4. **Sequential Processing** - One request at a time with delays
639
 
640
+ # ### πŸ“‹ Input Tips:
641
+ # - **TIN**: Enter exactly 9 digits (remove hyphens)
642
+ # - **Names**: Use the exact spelling from your registration
643
+ # - **Date**: MM-DD-YYYY format works best
644
+ # - **Patience**: Process takes 2-5 minutes due to rate limiting
645
 
646
+ # ### ⚠️ Troubleshooting:
647
+ # - If validation fails, check your TIN and personal information
648
+ # - Ensure birthdate is in correct format
649
+ # - Verify name spelling matches your BIR registration
650
+ # - Try again if server is temporarily unavailable
651
+ # """)
652
 
653
  return demo
654