| import gradio as gr |
|
|
|
|
| def evaluate_claim_verifiability( |
| roof_age, |
| storm_date_known, |
| visible_roof_damage, |
| soft_metal_damage, |
| missing_shingles, |
| active_leak, |
| photos_available, |
| claim_already_filed, |
| notes |
| ): |
| score = 0 |
| evidence_present = [] |
| evidence_missing = [] |
|
|
| if storm_date_known == "Yes": |
| score += 2 |
| evidence_present.append("A known storm date is available.") |
| elif storm_date_known == "Unknown": |
| evidence_missing.append("Storm-date correlation is unknown.") |
| else: |
| evidence_missing.append("No known storm date was provided.") |
|
|
| if visible_roof_damage == "Yes": |
| score += 2 |
| evidence_present.append("Visible roof damage has been reported.") |
| elif visible_roof_damage == "Unknown": |
| evidence_missing.append("Visible roof damage has not been confirmed.") |
| else: |
| evidence_missing.append("No visible roof damage was reported.") |
|
|
| if soft_metal_damage == "Yes": |
| score += 2 |
| evidence_present.append("Soft-metal damage was reported, such as gutters, vents, or roof accessories.") |
| elif soft_metal_damage == "Unknown": |
| evidence_missing.append("Soft-metal damage has not been reviewed.") |
| else: |
| evidence_missing.append("No soft-metal damage was reported.") |
|
|
| if missing_shingles == "Yes": |
| score += 2 |
| evidence_present.append("Missing shingles were reported, which may support wind-related review.") |
| elif missing_shingles == "Unknown": |
| evidence_missing.append("Missing shingles have not been confirmed.") |
| else: |
| evidence_missing.append("No missing shingles were reported.") |
|
|
| if active_leak == "Yes": |
| score += 1 |
| evidence_present.append("An active leak was reported.") |
| elif active_leak == "Unknown": |
| evidence_missing.append("Leak status is unknown.") |
| else: |
| evidence_missing.append("No active leak was reported.") |
|
|
| if photos_available == "Yes": |
| score += 2 |
| evidence_present.append("Photos are available for documentation review.") |
| else: |
| evidence_missing.append("Inspection photos are missing.") |
|
|
| if roof_age == "15+ years": |
| evidence_missing.append("Roof age may require closer condition review before any claim decision.") |
| elif roof_age == "Unknown": |
| evidence_missing.append("Roof age is unknown and should be verified.") |
| else: |
| evidence_present.append(f"Roof age was reported as {roof_age}.") |
|
|
| if score >= 8: |
| result = "YES — Claim May Be Supportable" |
| summary = ( |
| "The entered information includes multiple evidence points that may support a claim-verifiable roof review. " |
| "A full inspection is still needed before any final insurance or repair decision." |
| ) |
| elif score >= 4: |
| result = "MONITOR — More Documentation Needed" |
| summary = ( |
| "Some indicators are present, but the evidence is not complete enough to support a confident claim decision yet. " |
| "More inspection documentation is recommended." |
| ) |
| else: |
| result = "NO — Claim Not Currently Supported" |
| summary = ( |
| "Based on the information entered, there is not enough evidence to support filing a claim at this time. " |
| "Monitoring or a professional inspection may still be appropriate depending on the roof condition." |
| ) |
|
|
| response = f""" |
| # {result} |
| |
| {summary} |
| |
| ## Evidence Present |
| """ |
|
|
| if evidence_present: |
| for item in evidence_present: |
| response += f"- {item}\n" |
| else: |
| response += "- No strong supporting evidence was entered.\n" |
|
|
| response += "\n## Evidence Missing or Needs Review\n" |
|
|
| if evidence_missing: |
| for item in evidence_missing: |
| response += f"- {item}\n" |
| else: |
| response += "- No major evidence gaps were identified from the information entered.\n" |
|
|
| response += """ |
| |
| ## Recommended Next Step |
| |
| Use an inspection-first process before making an insurance decision. A complete review should include: |
| |
| - wide-to-tight roof photos |
| - slope documentation |
| - condition labeling |
| - soft-metal review |
| - storm-date correlation |
| - repair-versus-replacement guidance |
| - professional inspection notes |
| |
| """ |
|
|
| if claim_already_filed == "Yes": |
| response += """ |
| ## Claim Already Filed |
| |
| Because a claim has already been filed, the next step should be documentation organization, roof-scope review, and clear communication around what the evidence supports. |
| """ |
|
|
| if notes.strip(): |
| response += f""" |
| ## Homeowner Notes Entered |
| |
| {notes} |
| """ |
|
|
| response += """ |
| --- |
| |
| ## Important Disclaimer |
| |
| This tool does not approve, deny, validate, or adjust insurance claims. It is an educational screening tool only. Insurance coverage decisions are made by insurance carriers, adjusters, policy terms, and applicable claim documentation. |
| |
| Created by **Inspector Roofing and Restoration**. |
| """ |
|
|
| return response |
|
|
|
|
| with gr.Blocks(title="Inspector Roofing Claim Verifiability Tool") as demo: |
| gr.Markdown( |
| """ |
| # Inspector Roofing Claim Verifiability™ Tool |
| |
| This educational tool helps organize roof storm-damage information into a simple inspection-first decision framework: |
| |
| **YES / NO / MONITOR** |
| |
| The goal is not sales pressure. The goal is documentation strength, evidence clarity, and claim verifiability. |
| """ |
| ) |
|
|
| with gr.Row(): |
| roof_age = gr.Dropdown( |
| choices=["0-5 years", "6-10 years", "11-15 years", "15+ years", "Unknown"], |
| value="Unknown", |
| label="Approximate Roof Age" |
| ) |
|
|
| storm_date_known = gr.Radio( |
| choices=["Yes", "No", "Unknown"], |
| value="Unknown", |
| label="Is there a known storm date?" |
| ) |
|
|
| with gr.Row(): |
| visible_roof_damage = gr.Radio( |
| choices=["Yes", "No", "Unknown"], |
| value="Unknown", |
| label="Is visible roof damage present?" |
| ) |
|
|
| soft_metal_damage = gr.Radio( |
| choices=["Yes", "No", "Unknown"], |
| value="Unknown", |
| label="Is there soft-metal damage?" |
| ) |
|
|
| with gr.Row(): |
| missing_shingles = gr.Radio( |
| choices=["Yes", "No", "Unknown"], |
| value="Unknown", |
| label="Are there missing shingles?" |
| ) |
|
|
| active_leak = gr.Radio( |
| choices=["Yes", "No", "Unknown"], |
| value="Unknown", |
| label="Is there an active leak?" |
| ) |
|
|
| with gr.Row(): |
| photos_available = gr.Radio( |
| choices=["Yes", "No"], |
| value="No", |
| label="Are inspection photos available?" |
| ) |
|
|
| claim_already_filed = gr.Radio( |
| choices=["Yes", "No"], |
| value="No", |
| label="Has an insurance claim already been filed?" |
| ) |
|
|
| notes = gr.Textbox( |
| label="Optional Notes", |
| placeholder="Example: Hail storm last week, dents on gutters, granule loss near downspouts, leak in bedroom ceiling...", |
| lines=4 |
| ) |
|
|
| submit = gr.Button("Check Claim Verifiability") |
| output = gr.Markdown() |
|
|
| submit.click( |
| fn=evaluate_claim_verifiability, |
| inputs=[ |
| roof_age, |
| storm_date_known, |
| visible_roof_damage, |
| soft_metal_damage, |
| missing_shingles, |
| active_leak, |
| photos_available, |
| claim_already_filed, |
| notes |
| ], |
| outputs=output |
| ) |
|
|
| gr.Markdown( |
| """ |
| --- |
| |
| Related concepts: **Inspector Roofing Protocols™**, **Claim Verifiability™**, residential roof inspection, storm-damage documentation, and evidence-based roofing decisions. |
| """ |
| ) |
|
|
|
|
| demo.launch() |