Gradio-based CSV Q&A Visualization App

Job ID: 39182687

Budget: ₹600 – ₹1,500 INR

xGradio-based CSV Question Answering and Visualization Application
1. Overview
The purpose of this project is to develop a Gradio-based application that allows users to upload
a CSV file, ask questions—including numerical queries—about its contents, and receive
answers generated by a local Large Language Model (LLM). The application must also support
graph plotting, with all visualizations displayed within the Gradio interface.
2. Functional Requirements
2.1 CSV File Handling
• File Upload:
• The application must allow users to upload CSV files.
• Validate the CSV file format and handle parsing errors gracefully.
2.2 Question Answering
• User Interaction:
• Users should be able to input questions related to the CSV data.
• The system must support both textual and numerical questions.
• LLM Integration (Ollama + Pydantic AI):
• Answers must be generated using a local LLM via the Ollama framework.
• The LLM agent should be implemented using Pydantic AI, ensuring structured
and efficient query processing.
• The recommended model is Llama 3.1 8B or a smaller alternative.
• The quantization level should be chosen appropriately by the developer to
balance performance and resource usage.
2.3 Graph Plotting and Visualization
• Graph Generation:
• The application must support generating graphs based on the CSV data.
• Embedded Visualization:
• All plotted graphs must be displayed within the Gradio app interface rather than
in external windows.
3. Technical Requirements
3.1 Framework and Libraries
• Gradio:
• The application must be built using the Gradio framework for the frontend.
• Pydantic AI for LLM Agent:
• The LLM-powered query processor must be built using Pydantic AI for structured
and reliable AI-powered responses.
• Ollama for LLM Execution:

• Utilize Ollama as the LLM backend to run models locally.
• The integration should ensure quick response times for user queries.
3.2 Model Specification
• Model Recommendation:
• Use Llama 3.1 8B or a smaller model as the default.
• Quantization Level:
• The developer should select an optimal quantization level to optimize for local
deployment performance and resource constraints.
3.3 Application Architecture
• Modularity:
• The system should be modular, with clear separation between:
• File handling
• Query processing using Pydantic AI
• LLM integration with Ollama
• Graph plotting
• Error Handling:
• Implement robust error handling for:
• CSV parsing errors
• User input validation
• LLM processing failures
—----------------------------------------------------------------------------------------------------------------------
Notes -
Sample CSV:
-> Housing price dataset from Kaggle.
-> Values will be both numerical and string data.
-> Max size 25MB.