data2aihub commited on
Commit
bb28e0c
·
verified ·
1 Parent(s): e962ce6

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. Dockerfile +19 -0
  2. README.md +5 -7
  3. app.py +3 -0
  4. requirements.txt +3 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a minimal base image with Python 3.9 installed
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory inside the container to /app
5
+ WORKDIR /app
6
+
7
+ # Copy all files from the current directory on the host to the container's /app directory
8
+ COPY . .
9
+
10
+ # Install Python dependencies listed in requirements.txt
11
+ RUN pip3 install -r requirements.txt
12
+
13
+ # Tell Hugging Face which port the app will run on
14
+ EXPOSE 8501
15
+
16
+ # Define the command to run the Streamlit app on port 8501 and make it accessible externally
17
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
18
+
19
+ # NOTE: Disable XSRF protection for easier external access in order to make batch predictions
README.md CHANGED
@@ -1,10 +1,8 @@
1
- ---
2
  title: SuperKartPredictionFrontend
3
- emoji: 👀
4
  colorFrom: indigo
5
- colorTo: pink
6
- sdk: docker
 
 
7
  pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  title: SuperKartPredictionFrontend
2
+ emoji: 🏢
3
  colorFrom: indigo
4
+ colorTo: purple
5
+ sdk: streamlit
6
+ sdk_version: streamlit==1.43.2 # Added the sdk_version field
7
+ app_file: app.py
8
  pinned: false
 
 
 
app.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import streamlit as st
2
+ st.title("✅ Streamlit is running")
3
+ st.title("✅ Set sdk to streamlit")
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ pandas==2.2.2
2
+ requests==2.28.1
3
+ streamlit==1.43.2