Jeremy Live commited on
Commit
578017a
Β·
1 Parent(s): f639c56

update readme

Browse files
Files changed (1) hide show
  1. README.md +12 -104
README.md CHANGED
@@ -1,104 +1,12 @@
1
- # Chatbot Agent with SQL and Gemini Integration
2
-
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
- [![Python 3.8+](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/downloads/)
5
- [![Gradio](https://img.shields.io/badge/Interface-Gradio-FF4B4B.svg)](https://gradio.app/)
6
-
7
- A powerful chatbot agent that integrates Google's Gemini language model with SQL database connectivity, enabling natural language to SQL query conversion and data visualization.
8
-
9
- ## 🌟 Features
10
-
11
- - **Natural Language to SQL**: Convert natural language questions into SQL queries
12
- - **Database Integration**: Connect to MySQL databases seamlessly
13
- - **Interactive Chat Interface**: User-friendly Gradio-based web interface
14
- - **Data Visualization**: Generate visualizations from query results
15
- - **Environment Configuration**: Easy setup with environment variables
16
-
17
- ## πŸš€ Quick Start
18
-
19
- ### Prerequisites
20
-
21
- - Python 3.8 or higher
22
- - MySQL database (or compatible database)
23
- - Google API key for Gemini
24
-
25
- ### Installation
26
-
27
- 1. Clone the repository:
28
- ```bash
29
- git clone https://github.com/yourusername/chatbot-agent-sql-gemini.git
30
- cd chatbot-agent-sql-gemini
31
- ```
32
-
33
- 2. Install dependencies:
34
- ```bash
35
- pip install -r requirements.txt
36
- ```
37
-
38
- 3. Create a `.env` file in the project root with your configuration:
39
- ```env
40
- DB_USER=your_db_username
41
- DB_PASSWORD=your_db_password
42
- DB_HOST=your_db_host
43
- DB_NAME=your_database_name
44
- GOOGLE_API_KEY=your_google_api_key
45
- ```
46
-
47
- ### Running the Application
48
-
49
- 1. Start the application:
50
- ```bash
51
- python app.py
52
- ```
53
-
54
- 2. Open your web browser and navigate to `http://localhost:7860`
55
-
56
- ## πŸ› οΈ Configuration
57
-
58
- The application can be configured using the following environment variables:
59
-
60
- | Variable | Description | Required |
61
- |----------|-------------|----------|
62
- | `DB_USER` | Database username | βœ… |
63
- | `DB_PASSWORD` | Database password | βœ… |
64
- | `DB_HOST` | Database host | βœ… |
65
- | `DB_NAME` | Database name | βœ… |
66
- | `GOOGLE_API_KEY` | Google API key for Gemini | βœ… |
67
-
68
- ## πŸ“¦ Dependencies
69
-
70
- - gradio >= 3.0.0
71
- - langchain >= 0.1.0
72
- - langchain-community >= 0.0.10
73
- - langchain-google-genai >= 0.1.0
74
- - langgraph >= 0.0.0
75
- - matplotlib >= 3.7.0
76
- - pandas >= 2.0.0
77
- - sqlalchemy >= 2.0.0
78
- - python-dotenv >= 1.0.0
79
-
80
- ## πŸ€– How It Works
81
-
82
- 1. The application connects to your SQL database using the provided credentials
83
- 2. Users input natural language questions through the Gradio interface
84
- 3. The Gemini model converts these questions into SQL queries
85
- 4. Queries are executed against the database
86
- 5. Results are formatted and displayed to the user
87
- 6. For appropriate data, visualizations are automatically generated
88
-
89
- ## πŸ“ Example Queries
90
-
91
- - "Show me the top 10 customers by total purchases"
92
- - "What were our total sales last month?"
93
- - "List all products with stock below minimum levels"
94
- - "Generate a bar chart of monthly sales for the past year"
95
-
96
- ## πŸ“„ License
97
-
98
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
99
-
100
- ## πŸ™ Acknowledgments
101
-
102
- - [Gradio](https://gradio.app/) for the web interface
103
- - [Google Gemini](https://ai.google.dev/) for the language model
104
- - [LangChain](https://www.langchain.com/) for the agent framework
 
1
+ ---
2
+ title: ChatbotAgentGraphSQLgemini Etheroji
3
+ emoji: πŸ€–
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: "3.50.2"
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference