frances-dean commited on
Commit
ec192d5
1 Parent(s): 229621d

simulated loop should loop

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import os
2
- os.system('pip uninstall -y gradio')
3
- os.system('pip install gradio==5.0.1')
4
 
5
 
6
  import gradio as gr
@@ -465,7 +465,7 @@ def pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=True, loop_sim
465
  plt.xlim((0,250))
466
  start = (N-2)*60000
467
  end = (N)*60000
468
- if animate:
469
  line = ax.plot(volumes[start:(start+1)], pressures[start:(start+1)], lw=1, color='b')
470
  point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5)#, label='End Diastole')
471
  #point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5, label='End Systole')
 
1
  import os
2
+ # os.system('pip uninstall -y gradio')
3
+ # os.system('pip install gradio==5.0.1')
4
 
5
 
6
  import gradio as gr
 
465
  plt.xlim((0,250))
466
  start = (N-2)*60000
467
  end = (N)*60000
468
+ if animate or loop_simulated:
469
  line = ax.plot(volumes[start:(start+1)], pressures[start:(start+1)], lw=1, color='b')
470
  point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5)#, label='End Diastole')
471
  #point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5, label='End Systole')