mgbam commited on
Commit
457c8fa
·
verified ·
1 Parent(s): f52ffa0

Upload 2 files

Browse files
Files changed (2) hide show
  1. app_space.py +2 -2
  2. requirements.txt +1 -0
app_space.py CHANGED
@@ -66,7 +66,7 @@ def plot_gating(signal_text: str):
66
  fig.savefig(buf, format="png", dpi=120)
67
  plt.close(fig)
68
  buf.seek(0)
69
- return buf
70
 
71
 
72
  demo_normal = [0.05 for _ in range(256)]
@@ -88,7 +88,7 @@ with gr.Blocks(title="Sundew ECG Demo") as demo:
88
  label="ECG samples (JSON list)",
89
  value=json.dumps(demo_afib[:128]),
90
  )
91
- img = gr.Image(type="filepath", label="Raw vs Gated")
92
  btn2 = gr.Button("Show gating")
93
  btn2.click(plot_gating, inputs=inp2, outputs=img)
94
  with gr.Tab("Demos"):
 
66
  fig.savefig(buf, format="png", dpi=120)
67
  plt.close(fig)
68
  buf.seek(0)
69
+ return buf.read()
70
 
71
 
72
  demo_normal = [0.05 for _ in range(256)]
 
88
  label="ECG samples (JSON list)",
89
  value=json.dumps(demo_afib[:128]),
90
  )
91
+ img = gr.Image(type="numpy", label="Raw vs Gated")
92
  btn2 = gr.Button("Show gating")
93
  btn2.click(plot_gating, inputs=inp2, outputs=img)
94
  with gr.Tab("Demos"):
requirements.txt CHANGED
@@ -7,3 +7,4 @@ tqdm
7
  sundew-algorithms
8
  adaptive-sparse-training
9
  matplotlib
 
 
7
  sundew-algorithms
8
  adaptive-sparse-training
9
  matplotlib
10
+ numpy<2