Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -695,10 +695,8 @@ elif app_mode == "Predictions":
|
|
695 |
|
696 |
except Exception as e:
|
697 |
st.error(f"An error occurred during prediction: {e}")
|
698 |
-
else:
|
699 |
-
st.write("Please train a model first in the 'Model Training' section.")
|
700 |
|
701 |
-
|
702 |
st.subheader("Batch Predictions")
|
703 |
batch_file = st.file_uploader("Upload CSV for Batch Predictions", type=["csv"])
|
704 |
if batch_file is not None:
|
@@ -717,9 +715,11 @@ elif app_mode == "Predictions":
|
|
717 |
href = f'<a href="data:file/csv;base64,{b64}" download="predictions.csv">Download Predictions CSV</a>'
|
718 |
st.markdown(href, unsafe_allow_html=True)
|
719 |
|
720 |
-
|
721 |
-
|
722 |
|
|
|
|
|
723 |
|
724 |
elif app_mode == "Visualization Lab":
|
725 |
st.title("🔬 Advanced Data Visualization and Clustering Lab")
|
|
|
695 |
|
696 |
except Exception as e:
|
697 |
st.error(f"An error occurred during prediction: {e}")
|
|
|
|
|
698 |
|
699 |
+
#Add batch prediction section in prediction tab
|
700 |
st.subheader("Batch Predictions")
|
701 |
batch_file = st.file_uploader("Upload CSV for Batch Predictions", type=["csv"])
|
702 |
if batch_file is not None:
|
|
|
715 |
href = f'<a href="data:file/csv;base64,{b64}" download="predictions.csv">Download Predictions CSV</a>'
|
716 |
st.markdown(href, unsafe_allow_html=True)
|
717 |
|
718 |
+
except Exception as e:
|
719 |
+
st.error(f"Error processing batch file: {e}")
|
720 |
|
721 |
+
else:
|
722 |
+
st.write("Please train a model first in the 'Model Training' section.")
|
723 |
|
724 |
elif app_mode == "Visualization Lab":
|
725 |
st.title("🔬 Advanced Data Visualization and Clustering Lab")
|