ScottIzi commited on
Commit
1e1b4bf
·
verified ·
1 Parent(s): 624866e

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. .streamlit/config.toml +8 -0
  2. Dockerfile +15 -11
.streamlit/config.toml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+
2
+ [server]
3
+ headless = true
4
+ port = 8501
5
+ address = "0.0.0.0"
6
+
7
+ [browser]
8
+ gatherUsageStats = false
Dockerfile CHANGED
@@ -1,22 +1,26 @@
1
 
2
- # Use a lightweight Python 3.12 base image
3
  FROM python:3.12-slim
4
 
5
- # Set the working directory inside the container
6
  WORKDIR /app
7
 
8
- # Copy all files from the local frontend_files folder into the container
9
  COPY . .
10
 
11
- # Install Python dependencies from requirements.txt
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Expose Streamlit's default port
15
  EXPOSE 8501
16
 
17
- # NOTE: Disable XSRF protection for easier external access in order to make batch predictions
18
- CMD streamlit run app.py \
19
- --server.port=8501 \
20
- --server.address=0.0.0.0 \
21
- --server.enableCORS=false \
22
- --server.enableXsrfProtection=false
 
 
 
 
 
1
 
2
+ # Use a lightweight Python image
3
  FROM python:3.12-slim
4
 
5
+ # Set working directory
6
  WORKDIR /app
7
 
8
+ # Copy files into container
9
  COPY . .
10
 
11
+ # Install dependencies
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Expose Streamlit port
15
  EXPOSE 8501
16
 
17
+ # Start Streamlit server
18
+ CMD [
19
+ "streamlit",
20
+ "run",
21
+ "app.py",
22
+ "--server.port=8501",
23
+ "--server.address=0.0.0.0",
24
+ "--server.enableCORS=false",
25
+ "--server.enableXsrfProtection=false"
26
+ ]