Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.12.0
Update Your Hugging Face Space (RAG)
This guide helps you update your existing Space to reflect the new HR policy features (sample corpus + loader button).
What Changed
- Added "Load Sample HR Policy Documents" in the Manage Documents tab
- Included curated HR policy snippets (PTO, overtime, payroll schedule, benefits, FMLA, expenses, reviews)
- Minor README improvements
Files to Update in Your Space
Upload these 3 files from this repo to your Space:
project3-document-qa/app.pyproject3-document-qa/requirements.txt- (optional)
project3-document-qa/README.md
Option A β Upload via Web UI (Easiest)
- Go to your Space: https://huggingface.co/spaces/zhangju2023/document-qa-rag
- Click the "Files" tab
- Upload the files listed above (drag & drop or click Upload)
- Commit the changes β the Space will rebuild automatically
- Wait 1β3 minutes for the rebuild
Option B β Link to GitHub (Recommended)
- In your Space, open "Settings" β "Repository" β "Link Git Repositories"
- Connect GitHub repo:
justin-mbca/enterprise-ai-workflows - Map the subdirectory:
/project3-document-qa - App file:
app.py(Gradio) - Save. The Space will auto-sync on every push to
main.
After Update β Quick Test
In the running app:
- Go to "π Manage Documents"
- Click "π₯ Load Sample HR Policy Documents" β wait for success
- Switch to "π¬ Ask Questions" and try:
- "What is the overtime policy?"
- "When is payroll processed?"
- "How does PTO accrue?"
If you see "No relevant documents", ensure you loaded the HR sample first.
Troubleshooting
- First load can take 1β3 minutes while models download
- If the Space errors, check Logs β look for package install or model download issues
- You can switch to a lighter LLM in
app.py(e.g.,sshleifer/tiny-gpt2) to reduce cold start time