File size: 2,232 Bytes
4ef5712
 
 
 
 
 
 
 
962831e
4ef5712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ea534aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ef5712
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
title: LLM Excel Plotter
emoji: πŸ“Š
colorFrom: indigo
colorTo: purple
sdk: docker
sdk_version: "1.0"
app_file: app.py
app_port: 7860
pinned: false
---

# LLM Excel Plotter Agent

An intelligent Hugging Face Space that uses Large Language Models to process Excel data, generate meaningful charts, and provide automated analysis.

## Features

- πŸ“ˆ **Intelligent Chart Generation**: Uses Qwen2.5 and BART models to understand data and generate appropriate visualizations
- πŸ€– **LLM-Powered Analysis**: Leverages state-of-the-art language models for data interpretation
- πŸ“Š **Multiple Chart Types**: Supports line charts, bar charts, scatter plots, and more
- 🎨 **Interactive UI**: Clean, modern interface built with React and Plotly.js
- πŸ“ **File Upload**: Process CSV files and get instant analysis

## Models & APIs

### Local Models (Free)
- **Qwen2.5-1.5B-Instruct**: Local inference for data analysis
- **BART Fine-tuned**: Custom model for structured text generation

### Supported External APIs (Optional)
- Gemini 2.0 Flash: Add `GEMINI_API_KEY` environment variable
- Grok-3 Mini: Add `GROK_API_KEY` environment variable

## Usage

1. Upload a CSV file containing your data
2. Ask the chatbot to analyze or visualize specific aspects
3. View generated charts and insights
4. Export results or ask follow-up questions

## Deployment

Built with:
- **Backend**: Flask (Python 3.10)
- **Frontend**: React 18.3.1
- **LLM Integration**: Transformers, HuggingFace Inference
- **Data Processing**: Pandas, Scikit-learn

Deploy to Hugging Face Spaces with Docker support enabled.

## Health And Wake-Up Endpoint

To support cold-start recovery on free-tier Hugging Face Spaces, this backend exposes:

- `GET /health`

This endpoint is lightweight and intended for:

- frontend wake-up checks before user requests,
- retry logic diagnostics,
- optional cron-based warm-up pings.

Example:

```bash
curl https://<your-space>.hf.space/health
```

Typical response:

```json
{
	"status": "ok",
	"service": "llm-excel-plotter-agent",
	"uptime_seconds": 12.34,
	"timestamp": 1700000000
}
```

---

For more information, visit the [project repository](https://github.com/priyansh-saxena1/LLM-Integrated-Excel-Plotter-App)