dperales commited on
Commit
9c773d7
·
1 Parent(s): a76c33f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -50,6 +50,15 @@ if page == "Clustering Analysis":
50
  # Upload the CSV file
51
  uploaded_file = st.file_uploader("Choose a CSV file", type="csv")
52
 
 
 
 
 
 
 
 
 
 
53
  # Define the unsupervised model
54
  clusteringmodel = ['kmeans', 'ap', 'meanshift', 'sc', 'hclust', 'dbscan', 'optics', 'birch']
55
  selected_model = st.selectbox("Choose a clustering model", clusteringmodel)
@@ -59,15 +68,6 @@ if page == "Clustering Analysis":
59
  # selected_clusters = st.selectbox("Choose a number of clusters", numclusters)
60
  selected_clusters = st.slider("Choose a number of clusters", min_value=2, max_value=10, value=4)
61
 
62
- directory = "./"
63
- all_files = os.listdir(directory)
64
- # Filter files to only include CSV files
65
- csv_files = [file for file in all_files if file.endswith(".csv")]
66
- # Display the list of CSV files
67
- st.write("CSV files in the directory:")
68
- for file in csv_files:
69
- st.write(file)
70
-
71
  # Read and display the CSV file
72
  if uploaded_file is not None:
73
  try:
 
50
  # Upload the CSV file
51
  uploaded_file = st.file_uploader("Choose a CSV file", type="csv")
52
 
53
+ # Display the list of CSV files
54
+ directory = "./"
55
+ all_files = os.listdir(directory)
56
+ # Filter files to only include CSV files
57
+ csv_files = [file for file in all_files if file.endswith(".csv")]
58
+ st.write("CSV files in the directory:")
59
+ for file in csv_files:
60
+ st.write(file)
61
+
62
  # Define the unsupervised model
63
  clusteringmodel = ['kmeans', 'ap', 'meanshift', 'sc', 'hclust', 'dbscan', 'optics', 'birch']
64
  selected_model = st.selectbox("Choose a clustering model", clusteringmodel)
 
68
  # selected_clusters = st.selectbox("Choose a number of clusters", numclusters)
69
  selected_clusters = st.slider("Choose a number of clusters", min_value=2, max_value=10, value=4)
70
 
 
 
 
 
 
 
 
 
 
71
  # Read and display the CSV file
72
  if uploaded_file is not None:
73
  try: