kingabzpro/pakistan-notice-helper

A bilingual, multimodal safety assistant for notices, bills, SMS messages, bank alerts, challans, courier updates, and customs messages.

Python

4

48 commits

updated Jun 8, 2026

See the code

README

Pakistan Notice Helper logo

Pakistan Notice Helper

Check suspicious Pakistani messages before you trust, pay, or reply.

A bilingual, multimodal safety assistant for notices, bills, SMS messages,
bank alerts, challans, courier updates, and customs messages.

Open the live demo Watch the demo on YouTube Read the build story

Python 3.10+ Gradio 6.16 Qwen3.5-4B llama.cpp Hosted on Modal MIT License English and Urdu

What It Does

Paste text or upload a screenshot to receive:

ResultWhat you get
Risk assessmentLooks normal, Verify first, Suspicious, or Likely scam
Clear explanationA simple response in English or Urdu
Red flagsThe suspicious details that influenced the assessment
Safe next stepsPractical actions that avoid risky links and contacts
Reply draftA polite response that does not expose personal information

The mobile-first interface has a persistent English/Urdu switch. Urdu mode uses a right-to-left layout and asks the live model to answer in Urdu. Roman Urdu and mixed-language inputs are also supported.

[!IMPORTANT]

Pakistan Notice Helper checks common scam signals, but it does not provide official verification, legal advice, or financial advice. Always verify through an official website or helpline before paying or sharing personal information.

Hackathon Fit

This is a Backyard AI submission for the Build Small. Play Big. Hackathon. It applies a small model to a practical regional safety problem.

AreaProject evidence
Core constraintsPublic Gradio Space using Qwen3.5-4B, below the 32B limit
Backyard AIA real user tested the phone workflow and plans to use it for future suspicious messages
ModalQwen3.5-4B is hosted on a Modal L4 GPU endpoint
Tiny TitanThe 4B Q8 model passed the final 10-case internal regression suite
Llama ChampionQwen3.5-4B runs through a CUDA-enabled llama.cpp server using its OpenAI-compatible API
Off-BrandCustom mobile-first HTML, CSS, and JavaScript interface served through gradio.Server instead of the default Gradio UI
Sharing is CaringPrivacy-safe workflow traces are published as a Hugging Face dataset
Field NotesPublished a blog in the Build Small Hackathon organization sharing my opinions, development experience, model experiments, and lessons learned

Demo and User Feedback

The demo includes a real user testing the app on a phone, taking screenshots of messages, and checking them with Pakistan Notice Helper.

The user especially liked the app's speed and the accuracy of its responses. They said they plan to use it in the future to check different scam or suspicious messages.

Architecture

Text or screenshot
        |
        v
Custom bilingual frontend on gradio.Server
        |
        v
Image preprocessing and structured safety prompt
        |
        v
Qwen3.5-4B Q8_0 MTP on llama.cpp
        |
        v
Modal L4 endpoint
        |
        v
Risk label, explanation, red flags, and safe next steps

Gradio provides queueing, API routes, and Hugging Face Spaces hosting without exposing a default Gradio UI. Live analyses always use the configured model endpoint. There is no heuristic fallback, and endpoint failures are shown explicitly. Bundled English examples are cached; Urdu analyses are generated live.

Model and Evaluation

The focused test set covers banking notices, authority impersonation, prize scams, service messages, Urdu text, and screenshots. It is not a claim of general fraud-detection accuracy.

Run Locally

The web app requires the Qwen model endpoint to be deployed and available before it starts.

1. Install and authenticate

git clone https://github.com/kingabzpro/pakistan-notice-helper.git
cd pakistan-notice-helper

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

modal setup

modal setup opens a browser to authenticate your Modal account and configures the CLI. This account token is used only to run and deploy Modal code.

2. Download and deploy the model server

modal run model_server.py::download_model
modal deploy model_server.py

The first command downloads Qwen3.5-4B Q8 and its vision projector to a persistent Modal Volume. The second command deploys the private OpenAI-compatible llama.cpp server and prints its .modal.run endpoint URL.

3. Generate model proxy credentials

The model server uses Modal Proxy Auth. In the Modal Dashboard, open Settings > Proxy Auth Tokens, create a new token, and copy both values:

  • Token ID beginning with wk-
  • Token secret beginning with ws-

The secret is shown only once. These proxy credentials are different from the account token created by modal setup.

4. Configure and test the app

Set the credentials in the same terminal that will run the app:

$env:MODAL_PROXY_KEY = "wk-..."
$env:MODAL_PROXY_SECRET = "ws-..."

# Only required if your deployment printed a different endpoint URL:
$env:MODEL_BASE_URL = "https://your-workspace--pakistan-scam-checker-qwen35-4b-q8-serve.modal.run"
$env:MODEL_NAME = "qwen3.5-4b-q8"

python app.py --test-endpoint
python app.py

The endpoint test sends a synthetic notice to the deployed model and verifies the response contract before the UI starts. Never commit proxy credentials.

To use your own OpenAI-compatible llama.cpp server instead of Modal, set MODEL_BASE_URL, MODEL_NAME, and optionally MODEL_API_KEY. Image analysis also requires the Qwen vision projector (mmproj-F16.gguf) to be loaded by the server.

Privacy-Safe Traces

Users can explicitly consent to sharing a minimized workflow trace. Traces may include language, input type, risk label, latency, response length, and a coarse error category.

They do not include raw notice text, OCR text, screenshots, names, phone numbers, credentials, or full model responses. See the trace dataset card.

Privacy and Limitations

  • Inputs are processed in memory and are not written to disk by the app.
  • Model requests are sent to the configured Modal endpoint.
  • Redact CNIC numbers, account details, OTPs, PINs, and other sensitive data.
  • Poor images, mixed scripts, abbreviations, or missing context can reduce reliability.
  • Verify using contact details obtained independently from the message.

Official Verification

Never rely on a verification link contained inside a suspicious message.

codex
css
fraud-detection
gradio
html
js
llama-cpp
modal
mpt
pakistan-ai
qwen3-6-27b
scam-detection

kingabzpro/pakistan-notice-helper

A bilingual, multimodal safety assistant for notices, bills, SMS messages, bank alerts, challans, courier updates, and customs messages.

Python

4

48 commits

updated Jun 8, 2026

See the code

README

Pakistan Notice Helper logo

Pakistan Notice Helper

Check suspicious Pakistani messages before you trust, pay, or reply.

A bilingual, multimodal safety assistant for notices, bills, SMS messages,
bank alerts, challans, courier updates, and customs messages.

Open the live demo Watch the demo on YouTube Read the build story

Python 3.10+ Gradio 6.16 Qwen3.5-4B llama.cpp Hosted on Modal MIT License English and Urdu

What It Does

Paste text or upload a screenshot to receive:

ResultWhat you get
Risk assessmentLooks normal, Verify first, Suspicious, or Likely scam
Clear explanationA simple response in English or Urdu
Red flagsThe suspicious details that influenced the assessment
Safe next stepsPractical actions that avoid risky links and contacts
Reply draftA polite response that does not expose personal information

The mobile-first interface has a persistent English/Urdu switch. Urdu mode uses a right-to-left layout and asks the live model to answer in Urdu. Roman Urdu and mixed-language inputs are also supported.

[!IMPORTANT]

Pakistan Notice Helper checks common scam signals, but it does not provide official verification, legal advice, or financial advice. Always verify through an official website or helpline before paying or sharing personal information.

Hackathon Fit

This is a Backyard AI submission for the Build Small. Play Big. Hackathon. It applies a small model to a practical regional safety problem.

AreaProject evidence
Core constraintsPublic Gradio Space using Qwen3.5-4B, below the 32B limit
Backyard AIA real user tested the phone workflow and plans to use it for future suspicious messages
ModalQwen3.5-4B is hosted on a Modal L4 GPU endpoint
Tiny TitanThe 4B Q8 model passed the final 10-case internal regression suite
Llama ChampionQwen3.5-4B runs through a CUDA-enabled llama.cpp server using its OpenAI-compatible API
Off-BrandCustom mobile-first HTML, CSS, and JavaScript interface served through gradio.Server instead of the default Gradio UI
Sharing is CaringPrivacy-safe workflow traces are published as a Hugging Face dataset
Field NotesPublished a blog in the Build Small Hackathon organization sharing my opinions, development experience, model experiments, and lessons learned

Demo and User Feedback

The demo includes a real user testing the app on a phone, taking screenshots of messages, and checking them with Pakistan Notice Helper.

The user especially liked the app's speed and the accuracy of its responses. They said they plan to use it in the future to check different scam or suspicious messages.

Architecture

Text or screenshot
        |
        v
Custom bilingual frontend on gradio.Server
        |
        v
Image preprocessing and structured safety prompt
        |
        v
Qwen3.5-4B Q8_0 MTP on llama.cpp
        |
        v
Modal L4 endpoint
        |
        v
Risk label, explanation, red flags, and safe next steps

Gradio provides queueing, API routes, and Hugging Face Spaces hosting without exposing a default Gradio UI. Live analyses always use the configured model endpoint. There is no heuristic fallback, and endpoint failures are shown explicitly. Bundled English examples are cached; Urdu analyses are generated live.

Model and Evaluation

The focused test set covers banking notices, authority impersonation, prize scams, service messages, Urdu text, and screenshots. It is not a claim of general fraud-detection accuracy.

Run Locally

The web app requires the Qwen model endpoint to be deployed and available before it starts.

1. Install and authenticate

git clone https://github.com/kingabzpro/pakistan-notice-helper.git
cd pakistan-notice-helper

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

modal setup

modal setup opens a browser to authenticate your Modal account and configures the CLI. This account token is used only to run and deploy Modal code.

2. Download and deploy the model server

modal run model_server.py::download_model
modal deploy model_server.py

The first command downloads Qwen3.5-4B Q8 and its vision projector to a persistent Modal Volume. The second command deploys the private OpenAI-compatible llama.cpp server and prints its .modal.run endpoint URL.

3. Generate model proxy credentials

The model server uses Modal Proxy Auth. In the Modal Dashboard, open Settings > Proxy Auth Tokens, create a new token, and copy both values:

  • Token ID beginning with wk-
  • Token secret beginning with ws-

The secret is shown only once. These proxy credentials are different from the account token created by modal setup.

4. Configure and test the app

Set the credentials in the same terminal that will run the app:

$env:MODAL_PROXY_KEY = "wk-..."
$env:MODAL_PROXY_SECRET = "ws-..."

# Only required if your deployment printed a different endpoint URL:
$env:MODEL_BASE_URL = "https://your-workspace--pakistan-scam-checker-qwen35-4b-q8-serve.modal.run"
$env:MODEL_NAME = "qwen3.5-4b-q8"

python app.py --test-endpoint
python app.py

The endpoint test sends a synthetic notice to the deployed model and verifies the response contract before the UI starts. Never commit proxy credentials.

To use your own OpenAI-compatible llama.cpp server instead of Modal, set MODEL_BASE_URL, MODEL_NAME, and optionally MODEL_API_KEY. Image analysis also requires the Qwen vision projector (mmproj-F16.gguf) to be loaded by the server.

Privacy-Safe Traces

Users can explicitly consent to sharing a minimized workflow trace. Traces may include language, input type, risk label, latency, response length, and a coarse error category.

They do not include raw notice text, OCR text, screenshots, names, phone numbers, credentials, or full model responses. See the trace dataset card.

Privacy and Limitations

  • Inputs are processed in memory and are not written to disk by the app.
  • Model requests are sent to the configured Modal endpoint.
  • Redact CNIC numbers, account details, OTPs, PINs, and other sensitive data.
  • Poor images, mixed scripts, abbreviations, or missing context can reduce reliability.
  • Verify using contact details obtained independently from the message.

Official Verification

Never rely on a verification link contained inside a suspicious message.

codex
css
fraud-detection
gradio
html
js
llama-cpp
modal
mpt
pakistan-ai
qwen3-6-27b
scam-detection