Spaces:
Sleeping
Sleeping
arthi.kasturirangan@informa.com commited on
Commit ·
94404c6
1
Parent(s): c0e4bce
readme
Browse files
README.md
CHANGED
|
@@ -1,53 +1,11 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
Built with FastAPI, LangGraph, and SQLAlchemy for high-performance data querying.
|
| 14 |
-
|
| 15 |
-
## Quick Start
|
| 16 |
-
|
| 17 |
-
### Prerequisites
|
| 18 |
-
- Python 3.8+
|
| 19 |
-
- OpenAI API key
|
| 20 |
-
|
| 21 |
-
### Installation
|
| 22 |
-
|
| 23 |
-
1. **Clone and setup:**
|
| 24 |
-
```bash
|
| 25 |
-
git clone https://github.com/arthikrangan/text-to-sql-agent-api.git
|
| 26 |
-
cd text-to-sql-agent-api
|
| 27 |
-
python -m venv .venv
|
| 28 |
-
source .venv/bin/activate # Windows: .venv\Scripts\activate
|
| 29 |
-
```
|
| 30 |
-
|
| 31 |
-
2. **Install dependencies:**
|
| 32 |
-
```bash
|
| 33 |
-
pip install -r requirements.txt
|
| 34 |
-
```
|
| 35 |
-
|
| 36 |
-
3. **Configure environment:**
|
| 37 |
-
```bash
|
| 38 |
-
cp .env.example .env
|
| 39 |
-
# Edit .env and add your OPENAI_API_KEY
|
| 40 |
-
```
|
| 41 |
-
|
| 42 |
-
4. **Run the server:**
|
| 43 |
-
```bash
|
| 44 |
-
uvicorn app.main:app --reload
|
| 45 |
-
```
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
### Docker
|
| 49 |
-
```bash
|
| 50 |
-
# Build and run
|
| 51 |
-
docker build -t text-to-sql-api .
|
| 52 |
-
docker run -p 8000:8000 --env-file .env text-to-sql-api
|
| 53 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Text To Sql Agent Api
|
| 3 |
+
emoji: 🐨
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
short_description: SQL agent to converse with structured databases
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|