edmundmiller commited on
Commit
685d6d8
1 Parent(s): 3fb28d3

feat: Add spinner

Browse files
Files changed (1) hide show
  1. app.py +19 -14
app.py CHANGED
@@ -61,20 +61,25 @@ import os
61
 
62
  os.makedirs(prefix, exist_ok=True)
63
 
64
- denoised_anchor_to_anchor = predict_and_write(
65
- model,
66
- full_matrix_dir=HiCorr_data + f"/anchor_2_anchor.loop.{chromosome}",
67
- input_name=HiCorr_data + f"/anchor_2_anchor.loop.{chromosome}.p_val",
68
- outdir=prefix,
69
- anchor_dir=anchors,
70
- chromosome=chromosome,
71
- small_matrix_size=128,
72
- step_size=128,
73
- dummy=5,
74
- # max_dist,
75
- val_cols=["obs", "exp", "pval"],
76
- # keep_zeros,
77
- )
 
 
 
 
 
78
 
79
  # Print and list the files
80
  st.download_button(
 
61
 
62
  os.makedirs(prefix, exist_ok=True)
63
 
64
+ denoised_anchor_to_anchor = None
65
+
66
+ with st.spinner("Running the model"):
67
+ denoised_anchor_to_anchor = predict_and_write(
68
+ model,
69
+ full_matrix_dir=HiCorr_data + f"/anchor_2_anchor.loop.{chromosome}",
70
+ input_name=HiCorr_data + f"/anchor_2_anchor.loop.{chromosome}.p_val",
71
+ outdir=prefix,
72
+ anchor_dir=anchors,
73
+ chromosome=chromosome,
74
+ small_matrix_size=128,
75
+ step_size=128,
76
+ dummy=5,
77
+ # max_dist,
78
+ val_cols=["obs", "exp", "pval"],
79
+ # keep_zeros,
80
+ )
81
+
82
+ st.success("Done!")
83
 
84
  # Print and list the files
85
  st.download_button(