Spaces:
Configuration error
Configuration error
|
Download README.md from naveenadam/Natural_Language_Chabot: direct link, hf CLI and curl.
- Browser
- Download file 3.06 kB
-
https://huggingface.co/spaces/naveenadam/Natural_Language_Chabot/resolve/main/README.md
- Command line
-
hf download hf://spaces/naveenadam/Natural_Language_Chabot/README.md
-
curl -L -o README.md https://huggingface.co/spaces/naveenadam/Natural_Language_Chabot/resolve/main/README.md
3.06 kB
Excel Assistant
A Streamlit application that allows users to ask natural language questions about their Excel data and get answers using a Hugging Face LLM (TinyLlama-1.1B-Chat).
Features
- Upload Excel files (.xlsx) with up to 500 rows and 10-20 columns
- Automatic column name cleaning and normalization
- Natural language question answering about your data
- Automatic chart generation based on question context
- Question history tracking
- Support for complex data queries
Architecture
This project follows a modular structure:
app.py: Main Streamlit application and UIdata_utils.py: Excel file loading and data cleaning utilitiesllm_utils.py: LLM interaction and prompt handlingviz_utils.py: Visualization generation based on LLM responses
Requirements
- Python 3.8+
- CUDA-compatible GPU recommended (but not required)
- Dependencies listed in
requirements.txt
Installation
Clone this repository:
git clone https://github.com/yourusername/excel-assistant.git cd excel-assistantCreate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall the required packages:
pip install -r requirements.txt
Usage
Start the Streamlit app:
streamlit run app.pyOpen your web browser and navigate to the URL displayed in your terminal (typically http://localhost:8501)
Upload an Excel file using the sidebar upload button
View the data preview and ask questions about your data
Explore the generated charts and answers
Example Questions
- "What is the average age in the dataset?"
- "Show me a bar chart of sales by region"
- "What's the distribution of customer types?"
- "Show me customers under 30 years old"
- "Is there a correlation between age and income?"
Deployment Options
Streamlit Cloud
- Push your code to a GitHub repository
- Create an account on Streamlit Cloud
- Create a new app and connect it to your GitHub repository
- Deploy the app
Hugging Face Spaces
- Create an account on Hugging Face
- Create a new Space with Streamlit as the SDK
- Upload your code to the Space
- Configure the requirements
Performance Considerations
- The first query might take longer as the model is loaded into memory
- Quantization is used to reduce memory usage (4-bit)
- For large Excel files, consider pre-processing to reduce size
- Chart generation might take a few seconds depending on the complexity
Limitations
- Handles only the first sheet of an Excel file
- Works best with clean, structured data
- Chart extraction is based on pattern matching and might not always be perfect
- Advanced statistical operations might require additional implementation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.