Spaces:
Runtime error
Runtime error
| title: CompassIA | |
| emoji: π¬π # You can choose other emojis here | |
| colorFrom: green | |
| colorTo: blue | |
| sdk: docker # This must be 'docker' as you selected | |
| app_port: 7860 # This is the port your uvicorn app is listening on | |
| # Optional: You can specify a base image for the Docker SDK if not in Dockerfile directly. | |
| # base_image: python:3.10-slim-buster | |
| # pinned: false # Usually not needed unless you want to pin a specific commit | |
| # CompassIA | |
| This Space hosts the backend API for CompassIA, a PDF Question Answering system. CompassIA is a smart agent for MaarifCompass that allows users to ask questions about PDF documents, leveraging advanced AI models for natural language understanding and information retrieval. | |
| It uses: | |
| - **Python FastAPI** for the web API. | |
| - **DeepSeek Chat** (via OpenRouter) as the Large Language Model. | |
| - **BGE-M3** from FlagEmbedding for local, multilingual text embeddings. | |
| - **ChromaDB** for persistent vector storage. | |
| - **pdfminer.six** and **PyTesseract (with Poppler)** for robust PDF text extraction and OCR. | |
| ## How to Use: | |
| This Space exposes a `/compassia/` API endpoint. You can interact with it using `curl`, Postman, Insomnia, or by integrating it with your Next.js frontend. | |
| ### API Endpoint: `/compassia/` (POST request) | |
| **Request Body (JSON):** | |
| ```json | |
| { | |
| "question": "Your question about the PDF documents" | |
| } |