CoolFace
Apppublic

Sa-m/manifesto-explainer

sourceHugging Faceupdated 4mo agoView on Hugging Face
4likes
App README

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. 1.Create a new Space on Hugging Face.
  2. 2.Select Docker as the SDK.
  3. 3.Upload all files from this repository (or push via Git).
  4. 4.Go to Settings > Variables and secrets.
  5. 5.Add your GROQ_API_KEY and GEMINI_API_KEY as Secrets.
  6. 6.The app will automatically build and run on port 8080.

Integration with Frontend

If you are hosting the frontend on Cloudflare Pages:

  1. 1.Copy the URL of your Hugging Face Space (e.g., https://samarth-manifesto-explainer.hf.space).
  2. 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>