Upload folder using huggingface_hub
Browse files- Dockerfile +2 -2
- app.py +1 -1
- requirements.txt +9 -1
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 8501 and make it accessible externally
|
| 14 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--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
|
@@ -38,7 +38,7 @@ input_data = pd.DataFrame([{
|
|
| 38 |
}])
|
| 39 |
|
| 40 |
# Make prediction when the "Predict" button is clicked
|
| 41 |
-
if st.button("Predict"
|
| 42 |
response = requests.post("https://karora1804-StoreTotalSalesPredictionBackend.hf.space/v1/storeSales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 43 |
if response.status_code == 200:
|
| 44 |
prediction = response.json()['Predicted Total Sales:']
|
|
|
|
| 38 |
}])
|
| 39 |
|
| 40 |
# Make prediction when the "Predict" button is clicked
|
| 41 |
+
if st.button("Predict"):
|
| 42 |
response = requests.post("https://karora1804-StoreTotalSalesPredictionBackend.hf.space/v1/storeSales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
|
| 43 |
if response.status_code == 200:
|
| 44 |
prediction = response.json()['Predicted Total Sales:']
|
requirements.txt
CHANGED
|
@@ -1,3 +1,11 @@
|
|
| 1 |
pandas==2.2.2
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
streamlit==1.43.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
pandas==2.2.2
|
| 2 |
+
numpy==2.0.2
|
| 3 |
+
requests==2.32.3
|
| 4 |
+
pandas==2.2.2
|
| 5 |
+
numpy==2.0.2
|
| 6 |
+
scikit-learn==1.6.1
|
| 7 |
streamlit==1.43.2
|
| 8 |
+
gunicorn==20.1.0
|
| 9 |
+
uvicorn[standard]
|
| 10 |
+
huggingface_hub==0.30.1
|
| 11 |
+
Werkzeug==2.2.2
|