Sadjad Alikhani commited on
Commit
5ccfb52
·
verified ·
1 Parent(s): 6b8b0b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -194,14 +194,17 @@ def display_confusion_matrices_los(percentage_idx):
194
  # Main function to handle user choice
195
  def handle_user_choice(choice, percentage_idx=None, uploaded_file=None):
196
  if choice == "Use Default Dataset":
197
- return display_confusion_matrices_los(percentage_idx)
 
198
  elif choice == "Upload Dataset":
199
  if uploaded_file is not None:
200
- return process_hdf5_file(uploaded_file, percentage_idx)
 
201
  else:
202
- return "Please upload a dataset", "Please upload a dataset"
203
  else:
204
- return "Invalid choice", "Invalid choice"
 
205
 
206
 
207
 
 
194
  # Main function to handle user choice
195
  def handle_user_choice(choice, percentage_idx=None, uploaded_file=None):
196
  if choice == "Use Default Dataset":
197
+ raw_img, embeddings_img = display_confusion_matrices_los(percentage_idx)
198
+ return raw_img, embeddings_img, "" # Return empty string for console output
199
  elif choice == "Upload Dataset":
200
  if uploaded_file is not None:
201
+ raw_img, embeddings_img, console_output = process_hdf5_file(uploaded_file, percentage_idx)
202
+ return raw_img, embeddings_img, console_output
203
  else:
204
+ return "Please upload a dataset", "Please upload a dataset", "" # Return empty string for console output
205
  else:
206
+ return "Invalid choice", "Invalid choice", "" # Return empty string for console output
207
+
208
 
209
 
210