Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- Dockerfile +27 -0
- gpt_model.pth +3 -0
- reruirements.txt +5 -0
Dockerfile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Python base image
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set environment variables
|
| 5 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
| 6 |
+
ENV PYTHONUNBUFFERED=1
|
| 7 |
+
|
| 8 |
+
# Set working directory
|
| 9 |
+
WORKDIR /app
|
| 10 |
+
|
| 11 |
+
# Copy project files
|
| 12 |
+
COPY response_1.py gpt_model.pth /app
|
| 13 |
+
|
| 14 |
+
# Install system dependencies
|
| 15 |
+
RUN apt-get update && apt-get install -y \
|
| 16 |
+
gcc \
|
| 17 |
+
git \
|
| 18 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
+
|
| 20 |
+
# Install Python dependencies
|
| 21 |
+
RUN pip install --no-cache-dir torch flask pandas scikit-learn
|
| 22 |
+
|
| 23 |
+
# Expose port for Flask app
|
| 24 |
+
EXPOSE 7860
|
| 25 |
+
|
| 26 |
+
# Run Flask app
|
| 27 |
+
CMD ["python", "response_1.py"]
|
gpt_model.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6db3855bbd3d8e9b0df953ec6ca9e0ade738d1d002b141e78818aa51076f9cf0
|
| 3 |
+
size 68904314
|
reruirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch>=2.0.0
|
| 2 |
+
pandas>=1.3.0
|
| 3 |
+
scikit-learn>=1.0
|
| 4 |
+
flask>=2.0
|
| 5 |
+
flask-cors>=3.0
|