Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.3.0
metadata
title: ChatDocxAI
emoji: π
colorFrom: indigo
colorTo: blue
sdk: gradio
sdk_version: 4.19.2
app_file: app.py
pinned: false
Backend (FastAPI with Gradio UI)
Structure
api.pyβ Main FastAPI appapp.pyβ Gradio wrapper for FastAPIutils.pyβ Helper functionsrequirements.txtβ Python dependencies.env.exampleβ Example environment variables
Port Configuration
- Single port (7860) with FastAPI mounted at the
/apipath
API Endpoints
- Upload Documents:
https://codegeass321-backendserver.hf.space/api/upload - Ask Questions:
https://codegeass321-backendserver.hf.space/api/ask - Check Status:
https://codegeass321-backendserver.hf.space/api/status - API Documentation:
https://codegeass321-backendserver.hf.space/api/docs
Running Locally
pip install -r requirements.txt
python app.py
Deploying to Hugging Face Spaces
- Create a new Space with Gradio SDK
- Upload this repository to the Space
- Set the following environment variables in the Space settings:
GOOGLE_API_KEY- Your Google Gemini API keySUPABASE_URL- Your Supabase URLSUPABASE_KEY- Your Supabase API key
For Render (Legacy)
- Use the following start command on Render:
uvicorn api:app --host 0.0.0.0 --port 10000 - Add your environment variables in the Render dashboard
Do not commit your real .env file! Use .env.example for reference.