Upload folder using huggingface_hub
Browse files- Dockerfile +2 -2
- app.py +8 -0
Dockerfile
CHANGED
|
@@ -10,8 +10,8 @@ COPY . .
|
|
| 10 |
# Explicitly add Python's script directory to PATH
|
| 11 |
ENV PATH="/usr/local/bin:$PATH"
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
RUN chmod -R 777 /
|
| 15 |
|
| 16 |
EXPOSE 8501
|
| 17 |
|
|
|
|
| 10 |
# Explicitly add Python's script directory to PATH
|
| 11 |
ENV PATH="/usr/local/bin:$PATH"
|
| 12 |
|
| 13 |
+
# Create the .streamlit directory if it doesn't exist and grant write permissions
|
| 14 |
+
RUN mkdir -p /.streamlit && chmod -R 777 /.streamlit
|
| 15 |
|
| 16 |
EXPOSE 8501
|
| 17 |
|
app.py
CHANGED
|
@@ -1,6 +1,14 @@
|
|
| 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")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
import requests
|
| 4 |
+
from transformers import pipeline
|
| 5 |
+
|
| 6 |
+
# To load the trained model
|
| 7 |
+
def load_model():
|
| 8 |
+
return joblib.load("deployment_files/superkart_sales_prediction_model.joblib")
|
| 9 |
+
|
| 10 |
+
# Load the trained model
|
| 11 |
+
model = load_model()
|
| 12 |
|
| 13 |
# Set the title of the Streamlit app
|
| 14 |
st.title("SuperKart Sales Prediction")
|