PadmasaliGovardhan commited on
Commit
62cfbb8
·
1 Parent(s): 219bcf9

Deploy on Huggingface

Browse files
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ WORKDIR /code
5
+
6
+ # Copy dependencies first
7
+ COPY app/requirements.txt /code/requirements.txt
8
+
9
+ # Install dependencies
10
+ RUN pip install --no-cache-dir -r /code/requirements.txt
11
+
12
+ # Copy your app files
13
+ COPY app /code/app
14
+ COPY app.py /code/app.py
15
+
16
+ # Expose Hugging Face’s port
17
+ EXPOSE 7860
18
+
19
+ # Start FastAPI
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
21
+
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # app.py (root-level file)
2
+ from app.main import app
3
+
4
+ # This is required for Hugging Face to recognize the FastAPI app
5
+ if __name__ == "__main__":
6
+ import uvicorn
7
+ uvicorn.run(app, host="0.0.0.0", port=7860)
8
+
{backend → app}/embeddings.py RENAMED
File without changes
{backend → app}/main.py RENAMED
File without changes
{backend → app}/rag_app.py RENAMED
File without changes
{backend → app}/requirements.txt RENAMED
@@ -2,7 +2,6 @@ fastapi==0.115.0
2
  uvicorn==0.30.1
3
  python-multipart==0.0.9
4
  python-dotenv==1.0.1
5
- fitz==0.0.1.dev2
6
  PyMuPDF==1.24.2
7
  sentence-transformers==2.2.2
8
  faiss-cpu==1.7.4
 
2
  uvicorn==0.30.1
3
  python-multipart==0.0.9
4
  python-dotenv==1.0.1
 
5
  PyMuPDF==1.24.2
6
  sentence-transformers==2.2.2
7
  faiss-cpu==1.7.4
{backend → app}/store.py RENAMED
File without changes