Commit Β·
e409f74
1
Parent(s): a3264f4
chore: add huggingface spaces configuration metadata
Browse files- Dockerfile +11 -10
- README.md +9 -0
- start.sh +13 -0
Dockerfile
CHANGED
|
@@ -26,18 +26,19 @@ COPY requirements.txt .
|
|
| 26 |
RUN pip install --no-cache-dir -r requirements.txt && \
|
| 27 |
pip uninstall -y torch torchvision torchaudio transformers sentence-transformers 2>/dev/null || true
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# Copy application code
|
| 30 |
COPY . .
|
| 31 |
|
| 32 |
-
#
|
| 33 |
-
RUN
|
| 34 |
-
|
| 35 |
-
# Expose port
|
| 36 |
-
EXPOSE 8000
|
| 37 |
|
| 38 |
-
#
|
| 39 |
-
|
| 40 |
-
CMD curl -f http://localhost:8000/api/v1/health || exit 1
|
| 41 |
|
| 42 |
-
# Run the
|
| 43 |
-
CMD ["
|
|
|
|
| 26 |
RUN pip install --no-cache-dir -r requirements.txt && \
|
| 27 |
pip uninstall -y torch torchvision torchaudio transformers sentence-transformers 2>/dev/null || true
|
| 28 |
|
| 29 |
+
# Create upload, evaluation, and log directories with full read/write permissions
|
| 30 |
+
# (Crucial for Hugging Face Spaces which runs under user ID 1000)
|
| 31 |
+
RUN mkdir -p /app/data/uploads /app/evaluation/reports /app/logs && \
|
| 32 |
+
chmod -R 777 /app/data /app/evaluation /app/logs
|
| 33 |
+
|
| 34 |
# Copy application code
|
| 35 |
COPY . .
|
| 36 |
|
| 37 |
+
# Make the start script executable
|
| 38 |
+
RUN chmod +x /app/start.sh
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
# Expose the default web port (7860 for Hugging Face, 10000 for Render)
|
| 41 |
+
EXPOSE 7860
|
|
|
|
| 42 |
|
| 43 |
+
# Run the backend & frontend supervisor script
|
| 44 |
+
CMD ["./start.sh"]
|
README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# π Multi-Document RAG System
|
| 2 |
|
| 3 |
A production-ready **Retrieval-Augmented Generation** system for academic research papers with cross-document reasoning and RAGAS evaluation.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Multi Document RAG
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
# π Multi-Document RAG System
|
| 11 |
|
| 12 |
A production-ready **Retrieval-Augmented Generation** system for academic research papers with cross-document reasoning and RAGAS evaluation.
|
start.sh
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Start FastAPI backend in the background on port 8000
|
| 4 |
+
echo "π Starting FastAPI Backend on port 8000..."
|
| 5 |
+
uvicorn app.main:app --host 0.0.0.0 --port 8000 &
|
| 6 |
+
|
| 7 |
+
# Wait 3 seconds for backend to start up
|
| 8 |
+
sleep 3
|
| 9 |
+
|
| 10 |
+
# Start Chainlit frontend on the port specified by the host (Hugging Face uses 7860)
|
| 11 |
+
PORT=${PORT:-7860}
|
| 12 |
+
echo "π¨ Starting Chainlit Frontend on port $PORT..."
|
| 13 |
+
exec chainlit run chainlit_app/app.py --host 0.0.0.0 --port $PORT
|