Arnab Das commited on
Commit
3f96ef5
·
1 Parent(s): b9637be
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
  import matplotlib.pyplot as plt
3
  from manipulate_model.utils import get_config_and_model, infere
4
 
@@ -12,6 +13,8 @@ def process(filepath):
12
  out = infere(manipulate_model, filepath, manpulate_config)
13
  out = out.tolist()
14
  plt.plot(out)
 
 
15
  return str(out), plt
16
  demo = gr.Blocks()
17
  file_proc = gr.Interface(
 
1
  import gradio as gr
2
+ import numpy as np
3
  import matplotlib.pyplot as plt
4
  from manipulate_model.utils import get_config_and_model, infere
5
 
 
13
  out = infere(manipulate_model, filepath, manpulate_config)
14
  out = out.tolist()
15
  plt.plot(out)
16
+ out_masked = np.ma.masked_less_equal(out, 0.4)
17
+ plt.plot(out_masked, 'r', linewidth=2)
18
  return str(out), plt
19
  demo = gr.Blocks()
20
  file_proc = gr.Interface(