SuchithTissera commited on
Commit
08b60fe
·
verified ·
1 Parent(s): 3df0550

Update pages/1_Classification.py

Browse files
Files changed (1) hide show
  1. pages/1_Classification.py +11 -0
pages/1_Classification.py CHANGED
@@ -67,5 +67,16 @@ if uploaded_file is not None:
67
  st.success("Classification complete.")
68
  st.dataframe(uploaded_content.head())
69
 
 
 
 
 
 
 
 
 
 
 
 
70
  except Exception as e:
71
  st.error(f"Error reading or processing file: {e}")
 
67
  st.success("Classification complete.")
68
  st.dataframe(uploaded_content.head())
69
 
70
+ #converting to a csv
71
+ output_csv = uploaded_content.to_csv(index=False).encode("utf-8")
72
+
73
+ #download action
74
+ st.download_button(
75
+ label="Download output.csv",
76
+ data=output_csv,
77
+ file_name="output.csv",
78
+ mime="text/csv"
79
+ )
80
+
81
  except Exception as e:
82
  st.error(f"Error reading or processing file: {e}")