Spaces:
Sleeping
Sleeping
salsabilapl
commited on
Commit
•
045c80d
1
Parent(s):
c5570d1
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ import base64
|
|
24 |
|
25 |
|
26 |
# Streamlit UI
|
27 |
-
st.title('
|
28 |
-
st.write("
|
29 |
|
30 |
#Read Dataset
|
31 |
|
@@ -50,9 +50,9 @@ last_date = target_train.index[-1]
|
|
50 |
st.write(last_date)
|
51 |
|
52 |
# Streamlit UI
|
53 |
-
st.subheader("
|
54 |
|
55 |
-
if st.button("
|
56 |
|
57 |
#Fungsi forecast
|
58 |
@st.cache_resource
|
@@ -102,15 +102,15 @@ if st.button("Yes"):
|
|
102 |
pred_SARIMAX_selected = selected_rows['pred_SARIMAX']
|
103 |
|
104 |
# Show the predictions
|
105 |
-
st.subheader('
|
106 |
st.write(pred_SARIMAX_selected)
|
107 |
|
108 |
# Plot the predictions
|
109 |
plt.figure(figsize=(10, 5))
|
110 |
plt.plot(pred_SARIMAX_selected.index, pred_SARIMAX_selected, label='Predicted Sales', marker='o')
|
111 |
-
plt.xlabel('
|
112 |
-
plt.ylabel('
|
113 |
-
plt.title('
|
114 |
plt.grid()
|
115 |
plt.legend()
|
116 |
st.pyplot(plt)
|
@@ -120,4 +120,4 @@ if st.button("Yes"):
|
|
120 |
b64 = base64.b64encode(csv.encode()).decode() # Konversi DataFrame ke base64
|
121 |
|
122 |
# Show download button
|
123 |
-
st.markdown(f'<a href="data:file/csv;base64,{b64}" download="hasil_prediksi.csv">
|
|
|
24 |
|
25 |
|
26 |
# Streamlit UI
|
27 |
+
st.title('EIS Prediksi Demand Produk UMKM')
|
28 |
+
st.write("UDINUS - ASPOO")
|
29 |
|
30 |
#Read Dataset
|
31 |
|
|
|
50 |
st.write(last_date)
|
51 |
|
52 |
# Streamlit UI
|
53 |
+
st.subheader("Memprediksi permintaan produk UMKM Anda 7 hari kedepan?")
|
54 |
|
55 |
+
if st.button("Ya"):
|
56 |
|
57 |
#Fungsi forecast
|
58 |
@st.cache_resource
|
|
|
102 |
pred_SARIMAX_selected = selected_rows['pred_SARIMAX']
|
103 |
|
104 |
# Show the predictions
|
105 |
+
st.subheader('Prediksi Permintaan Barang 7 Hari Kedepan')
|
106 |
st.write(pred_SARIMAX_selected)
|
107 |
|
108 |
# Plot the predictions
|
109 |
plt.figure(figsize=(10, 5))
|
110 |
plt.plot(pred_SARIMAX_selected.index, pred_SARIMAX_selected, label='Predicted Sales', marker='o')
|
111 |
+
plt.xlabel('Tanggal')
|
112 |
+
plt.ylabel('Penjualan')
|
113 |
+
plt.title('Prediksi Permintaan Barang 7 Hari Kedepan')
|
114 |
plt.grid()
|
115 |
plt.legend()
|
116 |
st.pyplot(plt)
|
|
|
120 |
b64 = base64.b64encode(csv.encode()).decode() # Konversi DataFrame ke base64
|
121 |
|
122 |
# Show download button
|
123 |
+
st.markdown(f'<a href="data:file/csv;base64,{b64}" download="hasil_prediksi.csv">Unduh Hasil Prediksi (CSV)</a>', unsafe_allow_html=True)
|