Skip to content

condidatefounder/FanZha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A30 Project Workspace

This repository contains the demo-ready A30 anti-fraud assistant:

  • FastAPI backend with /api/health, /api/analyze, /api/intervene, /api/report, and /api/knowledge/import
  • Static frontend dashboard served from /
  • Lightweight rule engine, knowledge retrieval, and evaluation script

Quick Start

  1. Create and activate a virtual environment.

    python -m venv .venv
    .\.venv\Scripts\Activate.ps1
  2. Install dependencies.

    pip install -r requirements.txt
  3. Start the app.

    uvicorn app.backend.main:app --reload
  4. Open the dashboard.

    http://127.0.0.1:8000
    

Demo Flow

  1. Open the dashboard and choose a role: student, adult, or elderly.
  2. Paste suspicious text into the main input. Add optional audio and image hints if you want to show multimodal support.
  3. Click the main analysis button to call /api/analyze.
  4. Review the risk level, scam type, evidence chips, recommendation, and the generated report preview.
  5. Click the intervention button to call /api/intervene.
  6. For high-risk cases with a guardian contact, the backend returns guardian_notified; otherwise it falls back to a warning or tip-only action.
  7. If you want to show the report endpoint directly, call /api/report with the analysis summary payload and display the returned Markdown.

Evaluation

Run the evaluation script from the repository root:

python scripts/evaluate.py

The script prints a JSON summary with total, correct, and accuracy.

Acceptance Checklist

  • GET /api/health returns {"status": "ok"}
  • POST /api/analyze returns risk_level, scam_type, evidence, and recommendation
  • POST /api/intervene handles the high-risk guardian flow
  • POST /api/report returns a Markdown safety report
  • GET / serves the dashboard and /assets/* serves the frontend files
  • python scripts/evaluate.py prints a JSON evaluation summary

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors