|
Download README.md from GodRad/rag_saas: direct link, hf CLI and curl.
- Browser
- Download file 1.98 kB
-
https://huggingface.co/spaces/GodRad/rag_saas/resolve/main/README.md
- Command line
-
hf download hf://spaces/GodRad/rag_saas/README.md
-
curl -L -o README.md https://huggingface.co/spaces/GodRad/rag_saas/resolve/main/README.md
1.98 kB
metadata
title: RAG SaaS Platform
emoji: 🧠
colorFrom: blue
colorTo: indigo
sdk: docker
python_version: '3.11'
pinned: false
RAG Systems as a Service (SAAS)
Enterprise-grade, multi-tenant RAG platform designed for Hugging Face Spaces. This project consists of two main components:
rag_saasBackend: A FastAPI-based REST API for managing multi-tenant retrieval and generation.webappPlayground: A Streamlit interface for interactive testing, document ingestion, and "How it works" diagrams.
Quick Start on HF Spaces
Since this is a decoupled system, we recommend deploying as two separate Spaces for optimal performance.
1. Backend (API)
- Space Type: Docker Space.
- Root Files: Use the root
Dockerfileandapp/folder. - Secrets: Add
OPENAI_API_KEYorHUGGINGFACE_API_TOKEN.
2. Frontend (Playground)
- Space Type: Docker Space (using
webapp/Dockerfile). - Files: Only upload the contents of the
webapp/folder. - Link: Paste your Backend Space URL into the "API Connection" section of the playground sidebar.
Key Features
- Multi-Tenant Isolation: Secure data segregation using
X-Tenant-IDheaders. - Playground UI: Modern chat interface, ingestion dashboard, and educational onboarding.
- Enterprise-ready: DB-backed tenant management and storage (SQLite/Postgres).
- HF Optimized: Docker images configured with user
1000and port7860.
API Documentation
Once the backend is deployed, visit /docs for the OpenAPI Swagger UI.
Core Architecture
graph LR
User --> Streamlit[Web App Playground]
Streamlit --> API[FastAPI Backend]
API --> DB[(SQLite/Postgres)]
API --> VectorDB[(Vector Store)]
API --> LLM[OpenAI/HuggingFace]
Local Development
# 1. Start Backend
uvicorn app.main:app --reload --port 7860
# 2. Start Web App
cd webapp
streamlit run app.py