Manifesto_Explainer / README.md
Sa-m's picture
Upload folder using huggingface_hub
af6c8fc verified
|
Raw
History Blame Contribute Delete
1.05 kB
---
title: Manifesto Explainer API
emoji: 🗳️
colorFrom: indigo
colorTo: purple
sdk: docker
pinned: false
app_port: 8080
---
# Manifesto Explainer Backend
This is the FastAPI backend for the Manifesto Explainer platform.
It provides endpoints for PDF parsing, LLM summarization, and political analysis.
## Deployment on Hugging Face Spaces
1. Create a new **Space** on Hugging Face.
2. Select **Docker** as the SDK.
3. Upload all files from this repository (or push via Git).
4. Go to **Settings** > **Variables and secrets**.
5. Add your `GROQ_API_KEY` and `GEMINI_API_KEY` as **Secrets**.
6. The app will automatically build and run on port 8080.
## Integration with Frontend
If you are hosting the frontend on Cloudflare Pages:
1. Copy the URL of your Hugging Face Space (e.g., `https://samarth-manifesto-explainer.hf.space`).
2. In your `index.html` on Cloudflare, add this script tag before `script.js`:
```html
<script>window.BACKEND_URL = "https://your-space-name.hf.space";</script>
```