Update README.md
Browse files
README.md
CHANGED
|
@@ -1,68 +1,28 @@
|
|
| 1 |
-
# Insurance Document Analysis API
|
| 2 |
-
|
| 3 |
-
A FastAPI-based API for analyzing insurance documents using AI.
|
| 4 |
-
|
| 5 |
-
## Features
|
| 6 |
-
|
| 7 |
-
- PDF document processing and text extraction
|
| 8 |
-
- AI-powered analysis of insurance documents
|
| 9 |
-
- Vector search for document similarity
|
| 10 |
-
- Real-time analysis status tracking
|
| 11 |
-
- Chat interface for document queries
|
| 12 |
-
|
| 13 |
-
## API Endpoints
|
| 14 |
-
|
| 15 |
-
- `GET /health` - Health check
|
| 16 |
-
- `POST /ingest` - Upload and analyze PDF documents
|
| 17 |
-
- `GET /analysis/{document_id}` - Get analysis status
|
| 18 |
-
- `GET /findings/{document_id}` - Get analysis findings
|
| 19 |
-
- `POST /findings/{finding_id}/chat` - Chat about specific findings
|
| 20 |
-
|
| 21 |
-
## Environment Variables
|
| 22 |
-
|
| 23 |
-
Required for full functionality:
|
| 24 |
-
- `GROQ_API_KEY` - Groq API key for LLM analysis
|
| 25 |
-
- `PINECONE_API_KEY` - Pinecone API key for vector search
|
| 26 |
-
- `SUPABASE_URL` - Supabase project URL
|
| 27 |
-
- `SUPABASE_KEY` - Supabase API key
|
| 28 |
-
- `HF_API_KEY` - Hugging Face API key (optional)
|
| 29 |
-
|
| 30 |
-
## Local Development
|
| 31 |
-
|
| 32 |
-
```bash
|
| 33 |
-
pip install -r requirements.txt
|
| 34 |
-
python app.py
|
| 35 |
-
```
|
| 36 |
-
|
| 37 |
-
The API will be available at `http://localhost:7860`
|
| 38 |
-
|
| 39 |
-
## Hugging Face Spaces Deployment
|
| 40 |
-
|
| 41 |
-
This app is configured for deployment on Hugging Face Spaces:
|
| 42 |
-
|
| 43 |
-
1. **Create a new Space** on Hugging Face
|
| 44 |
-
2. **Choose "Docker"** as the SDK
|
| 45 |
-
3. **Upload these files** to your Space:
|
| 46 |
-
- `app.py` - Main FastAPI application
|
| 47 |
-
- `requirements.txt` - Python dependencies
|
| 48 |
-
- `README.md` - This file
|
| 49 |
-
|
| 50 |
-
4. **Set Environment Variables** in your Space settings:
|
| 51 |
-
- `GROQ_API_KEY`
|
| 52 |
-
- `PINECONE_API_KEY`
|
| 53 |
-
- `SUPABASE_URL`
|
| 54 |
-
- `SUPABASE_KEY`
|
| 55 |
-
- `HF_API_KEY` (optional)
|
| 56 |
-
|
| 57 |
-
5. **Deploy** - Hugging Face will automatically build and deploy your API
|
| 58 |
-
|
| 59 |
-
The API will be available at your Space URL (e.g., `https://your-username-insurance-api.hf.space`)
|
| 60 |
-
|
| 61 |
-
## Benefits of Hugging Face Spaces
|
| 62 |
-
|
| 63 |
-
- ✅ **Better Python support** than Vercel
|
| 64 |
-
- ✅ **No file size limits** like Vercel's 4.5MB
|
| 65 |
-
- ✅ **Longer execution times** for AI processing
|
| 66 |
-
- ✅ **Built-in GPU support** if needed
|
| 67 |
-
- ✅ **Free tier available**
|
| 68 |
-
- ✅ **Easy environment variable management**
|
|
|
|
| 1 |
+
# Insurance Document Analysis API
|
| 2 |
+
|
| 3 |
+
A FastAPI-based API for analyzing insurance documents using AI.
|
| 4 |
+
|
| 5 |
+
## Features
|
| 6 |
+
|
| 7 |
+
- PDF document processing and text extraction
|
| 8 |
+
- AI-powered analysis of insurance documents
|
| 9 |
+
- Vector search for document similarity
|
| 10 |
+
- Real-time analysis status tracking
|
| 11 |
+
- Chat interface for document queries
|
| 12 |
+
|
| 13 |
+
## API Endpoints
|
| 14 |
+
|
| 15 |
+
- `GET /health` - Health check
|
| 16 |
+
- `POST /ingest` - Upload and analyze PDF documents
|
| 17 |
+
- `GET /analysis/{document_id}` - Get analysis status
|
| 18 |
+
- `GET /findings/{document_id}` - Get analysis findings
|
| 19 |
+
- `POST /findings/{finding_id}/chat` - Chat about specific findings
|
| 20 |
+
|
| 21 |
+
## Environment Variables
|
| 22 |
+
|
| 23 |
+
Required for full functionality:
|
| 24 |
+
- `GROQ_API_KEY` - Groq API key for LLM analysis
|
| 25 |
+
- `PINECONE_API_KEY` - Pinecone API key for vector search
|
| 26 |
+
- `SUPABASE_URL` - Supabase project URL
|
| 27 |
+
- `SUPABASE_KEY` - Supabase API key
|
| 28 |
+
- `HF_API_KEY` - Hugging Face API key (optional)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|