Dheeraj-13 commited on
Commit
fd391de
·
1 Parent(s): 451cf27

Switch to Docker deployment

Browse files
Files changed (2) hide show
  1. Dockerfile +20 -0
  2. README.md +3 -2
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.9 image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /code
6
+
7
+ # Copy the requirements file
8
+ COPY ./requirements.txt /code/requirements.txt
9
+
10
+ # Install the dependencies
11
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
+
13
+ # Copy the rest of the application code
14
+ COPY . /code
15
+
16
+ # Expose the default Streamlit port
17
+ EXPOSE 8501
18
+
19
+ # Command to run the application
20
+ CMD ["streamlit", "run", "app.py", "--server.address", "0.0.0.0", "--server.port", "7860"]
README.md CHANGED
@@ -3,8 +3,9 @@ title: Sentiment Analysis App
3
  emoji: 🤖
4
  colorFrom: blue
5
  colorTo: indigo
6
- sdk: streamlit
7
- sdk_version: 1.28.0
 
8
  app_file: app.py
9
  pinned: false
10
  ---
 
3
  emoji: 🤖
4
  colorFrom: blue
5
  colorTo: indigo
6
+ sdk: docker
7
+ # sdk_version: 1.28.0 # Not needed for docker
8
+ app_port: 7860
9
  app_file: app.py
10
  pinned: false
11
  ---