audrey06100 commited on
Commit
5003639
·
1 Parent(s): 4e2a469
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -796,6 +796,10 @@ with gr.Blocks(delete_cache=(3600, 3600)) as demo:
796
  gr.Warning("Please upload a file and enter the sampling rate.")
797
  stage2_info["errorFlag"] = True
798
  return {stage2_json : stage2_info}
 
 
 
 
799
 
800
  # delete the previous folder of Stage2
801
  if "filePath" in stage2_info and stage2_info.get("state")=="finished":
@@ -848,7 +852,7 @@ with gr.Blocks(delete_cache=(3600, 3600)) as demo:
848
  old_idx = stage1_info["mappingResult"][i]["index"],
849
  orig_flags = stage1_info["mappingResult"][i]["isOriginalData"])
850
  except FileNotFoundError:
851
- print('stop!!')
852
  break_flag = True
853
  break
854
 
 
796
  gr.Warning("Please upload a file and enter the sampling rate.")
797
  stage2_info["errorFlag"] = True
798
  return {stage2_json : stage2_info}
799
+ elif samplerate.isdigit() == False:
800
+ gr.Warning("The sampling rate needs to be an integer.")
801
+ stage2_info["errorFlag"] = True
802
+ return {stage2_json : stage2_info}
803
 
804
  # delete the previous folder of Stage2
805
  if "filePath" in stage2_info and stage2_info.get("state")=="finished":
 
852
  old_idx = stage1_info["mappingResult"][i]["index"],
853
  orig_flags = stage1_info["mappingResult"][i]["isOriginalData"])
854
  except FileNotFoundError:
855
+ #print('stop!!')
856
  break_flag = True
857
  break
858