Spaces:
Runtime error
Runtime error
added button to download data
Browse files
app.py
CHANGED
@@ -277,7 +277,6 @@ def main():
|
|
277 |
st.write("Efficient Model:",max_key, accuracy_dict[max_key])
|
278 |
st.write("Go to test tab")
|
279 |
|
280 |
-
|
281 |
with test:
|
282 |
spectra_1 = st.file_uploader("Upload file test the model", type={"csv", "txt"})
|
283 |
|
@@ -339,6 +338,14 @@ def main():
|
|
339 |
kmeans_model =kmeans_model.predict(X)
|
340 |
st.write("K-Means Clustering Model:", kmeans_model)
|
341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
elif choice == "Regressor":
|
343 |
regressor()
|
344 |
elif choice == "NLP":
|
|
|
277 |
st.write("Efficient Model:",max_key, accuracy_dict[max_key])
|
278 |
st.write("Go to test tab")
|
279 |
|
|
|
280 |
with test:
|
281 |
spectra_1 = st.file_uploader("Upload file test the model", type={"csv", "txt"})
|
282 |
|
|
|
338 |
kmeans_model =kmeans_model.predict(X)
|
339 |
st.write("K-Means Clustering Model:", kmeans_model)
|
340 |
|
341 |
+
data_frame = pd.DataFrame(X).to_csv().encode('utf-8')
|
342 |
+
st.download_button(
|
343 |
+
label="Download data as CSV",
|
344 |
+
data=data_frame,
|
345 |
+
file_name='large_df.csv',
|
346 |
+
mime='text/csv',
|
347 |
+
)
|
348 |
+
|
349 |
elif choice == "Regressor":
|
350 |
regressor()
|
351 |
elif choice == "NLP":
|