Data Agent Demo

Data Agent Demo

Project 2 Q1(4): Deploy the agent model with a laptop and prepare a website for the demo.

Demo Overview

This page is the independent demo entry for the Data Agent system. It is separate from the Survival Analysis project and is used to present the deployment result for Q1(4).

The live model service runs locally on the laptop with Gradio. The website provides the project description, launch steps, model information, and demo prompts.

Model and Deployment

Item Value
Model Qwen3.5-0.8B
Checkpoint path F:\AssignmentsPre\LLMsoftware\project2\models\Qwen3.5-0.8B
Demo script F:\AssignmentsPre\LLMsoftware\project2\web_demo.py
Test data F:\AssignmentsPre\LLMsoftware\project2\data\demo_customer_churn.csv
Online Space URL https://wxinyu-wxy-blog-space.hf.space/
Local demo URL http://127.0.0.1:8000
Website URL https://wxyblog.me/project/data-agent-demo/

The assignment allows using the official Qwen3.5-0.8B checkpoint for this demo. The online version runs on Hugging Face Spaces, while the local script can still be used for offline testing.

Online Demo

The live Data Agent app is embedded below. If the embedded app is slow to start, open the Space directly:

Open Data Agent Space

Local Backup

The same demo can also be run locally. Open a terminal in the project directory and start the Gradio app:

1
python web_demo.py --checkpoint-path .\models\Qwen3.5-0.8B --inbrowser

For local browser access, open:

1
http://127.0.0.1:8000

Uploading External Data

The demo supports CSV and JSON uploads. After a file is uploaded, the app reads the file locally and sends a compact data summary to the model together with the user question. The summary includes file name, file type, columns or keys, row or item count, and a small preview.

This keeps the demo lightweight while still letting the agent reason about external data structure.

Example test file:

1
F:\AssignmentsPre\LLMsoftware\project2\data\demo_customer_churn.csv

For classroom or LAN demonstration, start the service with:

1
python web_demo.py --checkpoint-path .\models\Qwen3.5-0.8B --server-name 0.0.0.0 --server-port 8000

Example Prompts

  1. I have a CSV file with missing values and duplicated customer rows. Please design a data cleaning pipeline and explain each step.
  2. Given a table with customer tenure, monthly charges, contract type, and churn label, how should I build a churn prediction model?
  3. Write a SQL query to calculate the monthly churn rate by contract type, then explain how to interpret the result.
  4. Design an end-to-end analysis plan for a business dataset, including data validation, feature engineering, model training, and evaluation.

Evidence

After starting the local Gradio service, screenshots can be stored in:

1
source/assets/project2/data-agent-demo/

These screenshots can be used in the final report and presentation to show the running Data Agent interface.

0%