File size: 2,050 Bytes
a95b090
 
 
 
 
 
 
 
 
 
 
 
 
18f7294
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: ChatCSV
emoji: πŸŒ–
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
license: mit
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# CSV Chatbot

An interactive chatbot that analyzes CSV files using natural language queries. Upload your CSV data and ask questions in plain English to get insights, visualizations, and reports.

## Features

- **Natural Language Queries**: Ask questions about your CSV data in plain English
- **Multiple File Support**: Upload and analyze multiple CSV files at once
- **Automatic Visualization**: Generate charts and graphs based on your data
- **Report Generation**: Export conversation and analysis results as HTML reports
- **Smart CSV Handling**: Automatic detection of encoding, delimiters, and data types

## How to Use

1. **Upload CSV Files**: Click the upload button and select one or more CSV files
2. **Process Files**: Click "Process Files" to index your data
3. **Ask Questions**: Type your question in the text box and click "Submit"
4. **View Results**: See text responses, tables, and visualizations in the chat
5. **Export Results**: Click "Export Conversation" to create a shareable report

## Example Queries

- "What's the average value in column X?"
- "Show me a histogram of the distribution in column Y"
- "Is there a correlation between column A and column B?"
- "What are the top 5 values in column Z?"
- "Compare the average values grouped by category"

## Technical Details

This application uses:
- Phi-3-mini language model for natural language understanding
- LlamaIndex for data indexing and retrieval
- Pandas for data analysis
- Matplotlib for visualization
- Gradio for the web interface

## Limitations

- Large CSV files (>100MB) may take longer to process
- Complex statistical analyses may require specific phrasing
- Currently limited to tabular data in CSV format

## Feedback and Contributions

This is an open-source project. Feedback and contributions are welcome!