Spaces:
Sleeping
Sleeping
arthi.kasturirangan@informa.com commited on
Commit ·
e4b501b
1
Parent(s): 94404c6
readme
Browse files8 unmodified lines910118 unmodified lines---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference8 unmodified lines910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364658 unmodified lines---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference# Text-to-SQL Agent APIA FastAPI backend service that converts natural language queries into SQL and provides intelligent data insights using LangGraph agents.## OverviewThis API service enables natural language querying of SQL databases through an AI-powered agent that:- Converts text queries to SQL statements- Executes queries safely on SQLite databases- Provides intelligent data analysis and insights- Offers conversational interface for data explorationBuilt with FastAPI, LangGraph, and SQLAlchemy for high-performance data querying.## Quick Start### Prerequisites- Python 3.8+- OpenAI API key### Installation1. **Clone and setup:**```bashgit clone https://github.com/arthikrangan/text-to-sql-agent-api.gitcd text-to-sql-agent-apipython -m venv .venvsource .venv/bin/activate # Windows: .venv\Scripts\activate```2. **Install dependencies:**```bashpip install -r requirements.txt```3. **Configure environment:**```bashcp .env.example .env# Edit .env and add your OPENAI_API_KEY```4. **Run the server:**```bashuvicorn app.main:app --reload```### Docker```bash# Build and rundocker build -t text-to-sql-api .docker run -p 8000:8000 --env-file .env text-to-sql-api```
README.md+54