FocusFlow Assistant commited on
Commit ·
23d2ce2
1
Parent(s): df3e7e5
Restore Dockerfile and README for HF Spaces deployment
Browse files- Dockerfile +9 -9
- README.md +5 -46
Dockerfile
CHANGED
|
@@ -26,15 +26,15 @@ ENV LLM_PROVIDER=huggingface
|
|
| 26 |
|
| 27 |
# Create startup script
|
| 28 |
RUN echo '#!/bin/bash\n\
|
| 29 |
-
# Start FastAPI backend in background\n\
|
| 30 |
-
uvicorn backend.main:app --host 0.0.0.0 --port 8000 &\n\
|
| 31 |
-
\n\
|
| 32 |
-
# Wait for backend to start\n\
|
| 33 |
-
sleep 2\n\
|
| 34 |
-
\n\
|
| 35 |
-
# Start Streamlit frontend\n\
|
| 36 |
-
streamlit run app.py --server.port 8501 --server.address 0.0.0.0 --server.headless true\n\
|
| 37 |
-
' > /app/start.sh && chmod +x /app/start.sh
|
| 38 |
|
| 39 |
# Run startup script
|
| 40 |
CMD ["/app/start.sh"]
|
|
|
|
| 26 |
|
| 27 |
# Create startup script
|
| 28 |
RUN echo '#!/bin/bash\n\
|
| 29 |
+
# Start FastAPI backend in background\n\
|
| 30 |
+
uvicorn backend.main:app --host 0.0.0.0 --port 8000 &\n\
|
| 31 |
+
\n\
|
| 32 |
+
# Wait for backend to start\n\
|
| 33 |
+
sleep 2\n\
|
| 34 |
+
\n\
|
| 35 |
+
# Start Streamlit frontend\n\
|
| 36 |
+
streamlit run app.py --server.port 8501 --server.address 0.0.0.0 --server.headless true\n\
|
| 37 |
+
' > /app/start.sh && chmod +x /app/start.sh
|
| 38 |
|
| 39 |
# Run startup script
|
| 40 |
CMD ["/app/start.sh"]
|
README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
---
|
| 2 |
title: FocusFlow
|
|
|
|
| 3 |
colorFrom: blue
|
| 4 |
colorTo: purple
|
| 5 |
sdk: docker
|
|
@@ -7,52 +8,10 @@ app_port: 8501
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
-
# FocusFlow - AI Study Companion
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
- ** RAG-Powered Q&A**: Ask questions and get answers with source citations
|
| 18 |
-
- ** Adaptive Quizzes**: Context-based quizzes that adapt to your performance
|
| 19 |
-
- ** Progress Tracking**: Track mastery levels and quiz history
|
| 20 |
-
- ** Smart Day Progression**: Automatically unlocks new topics as you complete them
|
| 21 |
-
- ** Source Citations**: Every answer cites the exact source and page number
|
| 22 |
-
|
| 23 |
-
## Models Used
|
| 24 |
-
|
| 25 |
-
- **LLM**: Meta-Llama-3-8B-Instruct (via Hugging Face Inference API)
|
| 26 |
-
- **Embeddings**: nomic-embed-text (for semantic search)
|
| 27 |
-
|
| 28 |
-
## How to Use
|
| 29 |
-
|
| 30 |
-
1. **Upload PDFs**: Add your study materials in the Sources panel
|
| 31 |
-
2. **Generate Plan**: Ask the Calendar to create a study plan (e.g., "Make a 5-day plan")
|
| 32 |
-
3. **Study**: Click on topics to view lessons and ask questions
|
| 33 |
-
4. **Take Quizzes**: Test your knowledge and unlock new topics
|
| 34 |
-
|
| 35 |
-
## Demo Note
|
| 36 |
-
|
| 37 |
-
This is a **cloud demo version** running on Hugging Face Spaces using the Llama-3-8B model.
|
| 38 |
-
|
| 39 |
-
**For offline/local use** with enhanced privacy and llama3.2:1b (no internet required):
|
| 40 |
-
- [GitHub Repository](https://github.com/thesivarohith/hack)
|
| 41 |
-
- [Local Setup Guide](https://github.com/thesivarohith/hack/blob/main/RUN_GUIDE.md)
|
| 42 |
-
|
| 43 |
-
The local version works completely offline and keeps all your data private on your machine.
|
| 44 |
-
|
| 45 |
-
## Tech Stack
|
| 46 |
-
|
| 47 |
-
- **Frontend**: Streamlit
|
| 48 |
-
- **Backend**: FastAPI + LangChain
|
| 49 |
-
- **Vector DB**: ChromaDB
|
| 50 |
-
- **LLM**: Hugging Face Inference API
|
| 51 |
-
|
| 52 |
-
## License
|
| 53 |
-
|
| 54 |
-
MIT License - See [LICENSE](https://github.com/thesivarohith/hack/blob/main/LICENSE) for details.
|
| 55 |
-
|
| 56 |
-
---
|
| 57 |
-
|
| 58 |
-
Built with ❤️ for better learning experiences
|
|
|
|
| 1 |
---
|
| 2 |
title: FocusFlow
|
| 3 |
+
emoji: 📚
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: docker
|
|
|
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# 📚 FocusFlow - AI Study Companion
|
| 12 |
|
| 13 |
+
Intelligent study assistant with RAG-powered Q&A, adaptive quizzes, and personalized learning paths.
|
| 14 |
|
| 15 |
+
**Live Demo**: Running on Hugging Face Spaces with Llama-3-8B
|
| 16 |
|
| 17 |
+
**Local Setup**: [GitHub Repository](https://github.com/thesivarohith/hack)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|