Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,71 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
- Ask natural language questions about chart content
|
| 12 |
-
- Extract data points from charts into a structured format
|
| 13 |
-
- Download extracted data as CSV
|
| 14 |
-
- Chain-of-Thought reasoning for improved analysis
|
| 15 |
-
- Question history tracking
|
| 16 |
-
|
| 17 |
-
## Requirements
|
| 18 |
-
- Python 3.8+
|
| 19 |
-
- Dependencies listed in `requirements.txt`
|
| 20 |
-
|
| 21 |
-
## Installation
|
| 22 |
-
|
| 23 |
-
1. Clone this repository:
|
| 24 |
-
```bash
|
| 25 |
-
git clone https://github.com/sushantgai/ChartQA.git
|
| 26 |
-
cd ChartQA
|
| 27 |
-
```
|
| 28 |
-
|
| 29 |
-
2. Create a virtual environment:
|
| 30 |
-
```bash
|
| 31 |
-
python -m venv venv
|
| 32 |
-
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 33 |
-
```
|
| 34 |
-
|
| 35 |
-
3. Install the required packages:
|
| 36 |
-
```bash
|
| 37 |
-
pip install -r requirements.txt
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
## Usage
|
| 41 |
-
|
| 42 |
-
1. Run the Streamlit application:
|
| 43 |
-
```bash
|
| 44 |
-
streamlit run app.py
|
| 45 |
-
```
|
| 46 |
-
|
| 47 |
-
2. Access the application in your web browser at http://localhost:8501
|
| 48 |
-
|
| 49 |
-
3. Usage steps:
|
| 50 |
-
- Click "Load Model" in the sidebar to initialize the PaliGemma model
|
| 51 |
-
- Upload a chart image or load the sample chart
|
| 52 |
-
- Ask questions about the chart in the text input field
|
| 53 |
-
- Click "Extract Data Points" to convert the chart into tabular data
|
| 54 |
-
- Download the extracted data as CSV if needed
|
| 55 |
-
|
| 56 |
-
## Model Information
|
| 57 |
-
|
| 58 |
-
This application uses a fine-tuned version of the PaliGemma model specifically trained for chart understanding:
|
| 59 |
-
- Model: ahmed-masry/chartgemma
|
| 60 |
-
- The model can analyze various types of charts including bar charts, line charts, pie charts, and more
|
| 61 |
-
|
| 62 |
-
## Notes
|
| 63 |
-
- The first load of the model may take some time depending on your hardware
|
| 64 |
-
- GPU acceleration is automatically used if available, otherwise CPU is used
|
| 65 |
-
- Chain-of-Thought reasoning can be toggled on/off in the sidebar
|
| 66 |
-
- For best results, use clear images of charts with readable text and labels
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
## Acknowledgements
|
| 70 |
-
- This application uses the PaliGemma model fine-tuned for chart analysis
|
| 71 |
-
- Based on the transformers library from Hugging Face
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Chart Q&A
|
| 3 |
+
emoji: 📊
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: "1.30.0" # Adjust based on the latest Streamlit version
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|