Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- Dockerfile +2 -2
- app.py +6 -0
- requirements.txt +1 -0
Dockerfile
CHANGED
|
@@ -10,7 +10,7 @@ COPY . .
|
|
| 10 |
# Install Python dependencies listed in requirements.txt
|
| 11 |
RUN pip3 install -r requirements.txt
|
| 12 |
|
| 13 |
-
# Define the command to run the Streamlit app on port
|
| 14 |
-
CMD ["streamlit", "run", "app.py", "--server.port=
|
| 15 |
|
| 16 |
# NOTE: Disable XSRF protection for easier external access in order to make batch predictions
|
|
|
|
| 10 |
# Install Python dependencies listed in requirements.txt
|
| 11 |
RUN pip3 install -r requirements.txt
|
| 12 |
|
| 13 |
+
# Define the command to run the Streamlit app on port 7860 and make it accessible externally
|
| 14 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
|
| 15 |
|
| 16 |
# NOTE: Disable XSRF protection for easier external access in order to make batch predictions
|
app.py
CHANGED
|
@@ -1,10 +1,16 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
import requests
|
|
|
|
| 4 |
|
| 5 |
# Set the title of the Streamlit app
|
| 6 |
st.title("SuperKart Sales Prediction")
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# Section for single prediction
|
| 9 |
st.subheader("Single Product-Store Prediction")
|
| 10 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
import requests
|
| 4 |
+
import time
|
| 5 |
|
| 6 |
# Set the title of the Streamlit app
|
| 7 |
st.title("SuperKart Sales Prediction")
|
| 8 |
|
| 9 |
+
# Health check endpoint for Hugging Face
|
| 10 |
+
if st.query_params.get("healthcheck") == "true":
|
| 11 |
+
st.write("OK")
|
| 12 |
+
st.stop()
|
| 13 |
+
|
| 14 |
# Section for single prediction
|
| 15 |
st.subheader("Single Product-Store Prediction")
|
| 16 |
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
pandas==2.2.2
|
| 2 |
requests==2.28.1
|
| 3 |
streamlit==1.43.2
|
|
|
|
|
|
| 1 |
pandas==2.2.2
|
| 2 |
requests==2.28.1
|
| 3 |
streamlit==1.43.2
|
| 4 |
+
numpy==2.0.2
|