Spaces:
Paused
Paused
Commit
•
2ff1890
1
Parent(s):
3619e4b
adding in dockerfile and setup.sh
Browse files- Dockerfile +20 -0
- requirements.txt +1 -0
- setup.sh +10 -0
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.8-slim
|
3 |
+
|
4 |
+
# Set the working directory
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy the current directory contents into the container at /app
|
8 |
+
COPY . /app
|
9 |
+
|
10 |
+
# Install any needed packages specified in requirements.txt
|
11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
+
|
13 |
+
# Run setup.sh to download the SpaCy model
|
14 |
+
RUN chmod +x setup.sh && ./setup.sh
|
15 |
+
|
16 |
+
# Make port 7860 available to the world outside this container
|
17 |
+
EXPOSE 7860
|
18 |
+
|
19 |
+
# Run app.py when the container launches
|
20 |
+
CMD ["python", "app.py"]
|
requirements.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
gradio==4.36.1
|
2 |
pandas==2.0.3
|
|
|
3 |
pluralizer==1.2.0
|
4 |
psycopg2==2.9.9
|
5 |
python-dotenv==1.0.1
|
|
|
1 |
gradio==4.36.1
|
2 |
pandas==2.0.3
|
3 |
+
openai==1.34.0
|
4 |
pluralizer==1.2.0
|
5 |
psycopg2==2.9.9
|
6 |
python-dotenv==1.0.1
|
setup.sh
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Install the SpaCy model
|
4 |
+
python -m spacy download en_core_web_sm
|
5 |
+
|
6 |
+
# Move the model to the current directory (if needed)
|
7 |
+
# mkdir -p ./models
|
8 |
+
# mv ~/.local/share/spacy/models/en_core_web_sm-3.7.5 ./models/en_core_web_sm
|
9 |
+
|
10 |
+
echo "Setup complete."
|