Skip to content

Commit c35749a

Browse files
committed
🔖 Version 2.0 Using Gemini API
1 parent 663cddf commit c35749a

File tree

7 files changed

+651
-377
lines changed

7 files changed

+651
-377
lines changed

README.md

Lines changed: 66 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div align="center">
44

5-
[![Made with Azure OpenAI](https://img.shields.io/badge/Made%20with-Azure%20OpenAI-0078D4?style=for-the-badge&logo=microsoftazure)](https://azure.microsoft.com/products/cognitive-services/openai-service/)
5+
[![Made with Google Gemini](https://img.shields.io/badge/Made%20with-Google%20Gemini-4285F4?style=for-the-badge&logo=google)](https://deepmind.google/technologies/gemini/)
66
[![Built with Streamlit](https://img.shields.io/badge/Built%20with-Streamlit-FF4B4B?style=for-the-badge&logo=streamlit)](https://streamlit.io)
77
[![Database](https://img.shields.io/badge/Database-PostgreSQL%20%7C%20SQLite-336791?style=for-the-badge&logo=postgresql)](https://www.postgresql.org/)
88

@@ -22,52 +22,54 @@
2222
<summary>🎯 Core Features</summary>
2323

2424
- **Natural Language to SQL** 🗣️ → 📝
25-
- Convert text queries into SQL commands using Azure OpenAI
26-
- Intelligent query interpretation and generation
25+
- Convert text queries into SQL commands using Google's Gemini Pro model
26+
- Intelligent query interpretation with detailed decision logs
27+
- Step-by-step reasoning for query generation
2728
- **Multi-Database Support** 🗄️
28-
- SQLite compatibility
29-
- PostgreSQL integration
30-
- Dynamic database switching
29+
- SQLite compatibility with file upload
30+
- PostgreSQL integration with secure connection
31+
- Dynamic schema exploration
3132
- **Interactive Data Explorer** 🔍
32-
- Real-time data filtering
33-
- Interactive query results
34-
- Dynamic table views
33+
- Real-time data filtering and exploration
34+
- Comprehensive query results with summary statistics
35+
- Advanced table views with sorting and filtering
3536

3637
</details>
3738

3839
<details>
3940
<summary>📊 Visualization & Analytics</summary>
4041

4142
- **Dynamic Visualizations** 📈
42-
- Multiple chart types
43-
- Interactive configurations
44-
- Smart visualization suggestions ⭐️
43+
- Multiple chart types (Bar, Line, Scatter, Area, Histogram)
44+
- Interactive chart configuration
45+
- AI-powered visualization recommendations
4546
- **Summary Statistics** 📋
46-
- Numeric data insights
47-
- Categorical analysis
48-
- Trend identification
47+
- Detailed numeric analysis
48+
- Categorical data insights
49+
- Distribution analysis
50+
- Statistical measures (mean, median, mode, skewness, kurtosis)
4951

5052
</details>
5153

5254
<details>
5355
<summary>🛡️ Security & Management</summary>
5456

5557
- **Safe SQL Execution** 🔒
56-
- Query validation
58+
- Strict query validation
5759
- SQL injection prevention
58-
- Error handling
60+
- Comprehensive error handling and feedback
5961
- **Query History** 📚
60-
- Searchable log
61-
- Re-runnable queries
62-
- Export capabilities
62+
- Searchable query log
63+
- Query reusability
64+
- Multiple export formats (CSV, Excel, JSON)
6365

6466
</details>
6567

6668
## 🚀 Getting Started
6769

6870
```mermaid
6971
graph LR
70-
A[User Input] --> B[NLP Engine]
72+
A[User Input] --> B[Gemini Pro]
7173
B --> C[SQL Generator]
7274
C --> D[Database]
7375
D --> E[Results]
@@ -79,7 +81,7 @@ graph LR
7981
1️⃣ **Clone the Repository**
8082

8183
```bash
82-
git clone https://github.com/lohitkolluri/NLP2SQL.git
84+
git clone https://github.com/yourusername/NLP2SQL.git
8385
cd NLP2SQL
8486
```
8587

@@ -88,10 +90,7 @@ cd NLP2SQL
8890
```bash
8991
# Create .env file
9092
cat << EOF > .env
91-
OPENAI_API_KEY="Your Azure OpenAI API Key"
92-
OPENAI_ENDPOINT="https://name_of_openai_resource.openai.azure.com/"
93-
OPENAI_API_VERSION="API Version"
94-
MODEL_NAME="Name of Your Model from Azure OpenAI"
93+
GOOGLE_API_KEY="Your Google Gemini API Key"
9594
EOF
9695
```
9796

@@ -111,12 +110,12 @@ streamlit run app/NLP2SQL.py
111110

112111
<div align="center">
113112

114-
| Technology | Purpose |
115-
| :-------------------------------------------------------------------------------------------------------: | :------------: |
116-
| ![Streamlit](https://img.shields.io/badge/Streamlit-FF4B4B?style=flat-square&logo=streamlit) | Web Interface |
117-
| ![Azure OpenAI](https://img.shields.io/badge/Azure%20OpenAI-0078D4?style=flat-square&logo=microsoftazure) | NLP Processing |
118-
| ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-336791?style=flat-square&logo=postgresql) | Database |
119-
| ![Altair](https://img.shields.io/badge/Altair-005571?style=flat-square) | Visualizations |
113+
| Technology | Purpose |
114+
| :-------------------------------------------------------------------------------------------------: | :------------: |
115+
| ![Streamlit](https://img.shields.io/badge/Streamlit-FF4B4B?style=flat-square&logo=streamlit) | Web Interface |
116+
| ![Google Gemini](https://img.shields.io/badge/Google%20Gemini-4285F4?style=flat-square&logo=google) | NLP Processing |
117+
| ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-336791?style=flat-square&logo=postgresql) | Database |
118+
| ![Altair](https://img.shields.io/badge/Altair-005571?style=flat-square) | Visualizations |
120119

121120
</div>
122121

@@ -127,16 +126,16 @@ mindmap
127126
root((NLP2SQL))
128127
Query Processing
129128
Natural Language Input
130-
SQL Generation
131-
Validation
129+
Decision Logging
130+
Detailed Reasoning
132131
Visualization
133-
Charts
134-
Tables
135-
Statistics
132+
Interactive Charts
133+
Summary Statistics
134+
Data Distribution
136135
Database
137136
PostgreSQL
138137
SQLite
139-
Schema Explorer
138+
Schema Analysis
140139
Security
141140
Query Validation
142141
Error Handling
@@ -146,15 +145,37 @@ mindmap
146145
## 💡 How It Works
147146

148147
1. **Query Input** ➡️ User enters natural language query
149-
2. **Processing** ➡️ Azure OpenAI translates to SQL
150-
3. **Execution** ➡️ Query runs against selected database
151-
4. **Visualization** ➡️ Results displayed with appropriate charts
152-
5. **Export** ➡️ Download results in preferred format
148+
2. **Processing** ➡️ Gemini Pro analyzes and generates SQL with reasoning
149+
3. **Validation** ➡️ Query is validated for safety and correctness
150+
4. **Execution** ➡️ Query runs against selected database
151+
5. **Analysis** ➡️ Results are processed with summary statistics
152+
6. **Visualization** ➡️ Data is presented with AI-recommended charts
153+
7. **Export** ➡️ Results can be downloaded in multiple formats
153154

154-
<div align="center">
155+
## 📊 Supported Visualizations
156+
157+
- **Bar Chart**: Comparing categorical data
158+
- **Line Chart**: Time-series and trend analysis
159+
- **Scatter Plot**: Relationship between variables
160+
- **Area Chart**: Cumulative totals and trends
161+
- **Histogram**: Distribution analysis
162+
163+
## 🔒 Security Features
155164

156-
### 🌟 Start Exploring Your Data Today!
165+
- Strict SQL query validation
166+
- Prevention of harmful SQL operations
167+
- Secure database connections
168+
- Protected sensitive information
169+
- Input sanitization
157170

158-
---
171+
## 📈 Data Analysis
172+
173+
- Comprehensive summary statistics
174+
- Distribution analysis
175+
- Correlation detection
176+
- Trend identification
177+
- Outlier detection
178+
179+
<div align="center">
159180

160181
</div>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy