ArduinoYuri commited on
Commit
3190365
·
verified ·
1 Parent(s): a386724

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -7
README.md CHANGED
@@ -1,14 +1,52 @@
1
  ---
2
- title: Pandas CSV Analyzer-LlamaIndex
3
- emoji: 🔥
4
- colorFrom: red
5
- colorTo: gray
6
  sdk: gradio
7
- sdk_version: 5.44.1
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
- short_description: AI agent for CSV analysis with LlamaIndex & Pandas.
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Pandas CSV Analyzer (LlamaIndex)
3
+ emoji: 🐼
4
+ colorFrom: purple
5
+ colorTo: indigo
6
  sdk: gradio
 
7
  app_file: app.py
8
  pinned: false
9
  license: mit
10
+ short_description: An AI agent for CSV analysis with LlamaIndex & Pandas.
11
  ---
12
 
13
+ # 🐼 Pandas CSV Analyzer (LlamaIndex)
14
+
15
+ This is an advanced AI agent that allows you to analyze CSV files by asking questions in natural language. Upload a file, ask your questions, and get instant insights without writing a single line of code.
16
+
17
+ ## ✨ Key Features
18
+
19
+ * **Natural Language Queries:** Ask questions like, "Which branch had the highest total revenue?" or "Show the top 5 best-selling products."
20
+ * **Pandas Code Generation:** The AI generates and executes the necessary Python (Pandas) code to answer your query, displaying the code used for full transparency.
21
+ * **PDF Report Generation:** Download your entire conversation history and analysis in a clean and organized PDF report.
22
+ * **Robust Architecture:** Built with the new LlamaIndex Workflows library, ensuring a modular and reliable data processing pipeline.
23
+
24
+ ## 🚀 How to Use
25
+
26
+ 1. **Upload your CSV File:** Use the upload panel on the left to load your data.
27
+ 2. **Ask a Question:** Type your question about the data in the text box at the bottom.
28
+ 3. **Get Insights:** The agent will process your request, generate the answer, and display it in the chat.
29
+ 4. **Download the Report:** When your analysis is complete, click "Generate and Download PDF" to get a full report.
30
+
31
+ ## 🛠️ How it Works (Tech Stack)
32
+
33
+ This project integrates several cutting-edge technologies to create a seamless data analysis experience:
34
+
35
+ * **Interface:** **Gradio** is used to build the interactive web interface.
36
+ * **Data Manipulation:** **Pandas** is the engine behind all data manipulation and analysis of the CSV file.
37
+ * **AI Orchestration:** **LlamaIndex Workflows** manages the entire process, from receiving the user's question to synthesizing the final answer. This is a modern replacement for the older `QueryPipelines`.
38
+ * **Language Model (LLM):** The **Groq API** provides access to high-speed language models (like Llama 3) to generate Pandas code and synthesize human-readable answers.
39
+ * **PDF Generation:** The **FPDF2** library is used to create reports from the conversation history.
40
+
41
+ The workflow is as follows:
42
+ 1. The user submits a question.
43
+ 2. The LlamaIndex `PandasWorkflow` is initiated.
44
+ 3. The LLM receives the question, data schema, and examples, then generates a Pandas expression.
45
+ 4. This expression is safely executed in the backend.
46
+ 5. The result is sent back to the LLM, which generates a final, natural-language response for the user.
47
+
48
+ ---
49
+
50
+ *Developed by Yuri Arduino Bernardineli Alves*
51
+ * **GitHub:** [YuriArduino](https://github.com/YuriArduino)
52
+ * **Email:** yuriarduino@gmail.com