frances-dean commited on
Commit
073aa1e
1 Parent(s): c2a15c5

try looping simulations

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -495,8 +495,8 @@ def pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=True):
495
  return plt, Rm, Ra, Emax, Emin, Vd, Tc, start_v
496
 
497
  def pvloop_simulator_plot_only(Rm, Ra, Emax, Emin, Vd, Tc, start_v):
498
- plot,_,_,_,_,_,_,_ =pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=False)
499
- plt.title('Simulated PI-SSL LV Pressure Volume Loop', fontsize=16)
500
  return plot
501
 
502
  #########################################
@@ -833,7 +833,7 @@ def lvad_plots(Rm, Ra, Emax, Emin, Vd, Tc, start_v, beta):
833
  plt.legend(loc='upper left', framealpha=1)
834
  plt.ylim((0,220))
835
  plt.xlim((0,250))
836
- #plt.title('Simulated PI-SSL LV Pressure Volume Loop', fontsize=16)
837
 
838
  return plt, round(ef_nolvad,2), round(new_ef,2), round(co_nolvad,2), round(CO, 2)
839
 
@@ -900,7 +900,7 @@ with gr.Blocks() as demo:
900
  sl7 = gr.Slider(0.0, 280.0, value= 140., label="start_v (ml)")
901
 
902
  with gr.Row():
903
- simulation = gr.Plot()
904
 
905
  gr.Markdown(description3)
906
 
@@ -910,7 +910,7 @@ with gr.Blocks() as demo:
910
  beta = gr.Slider(.4, 1.0, value= 1.4, label="Pump speed parameter:")
911
 
912
  with gr.Row():
913
- lvad = gr.Plot()
914
 
915
  with gr.Row():
916
  EF_o = gr.Number(label="Ejection fraction (EF) before LVAD:")
 
495
  return plt, Rm, Ra, Emax, Emin, Vd, Tc, start_v
496
 
497
  def pvloop_simulator_plot_only(Rm, Ra, Emax, Emin, Vd, Tc, start_v):
498
+ plot,_,_,_,_,_,_,_ =pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=True)
499
+ plt.title('Simulated LV Pressure Volume Loop', fontsize=16)
500
  return plot
501
 
502
  #########################################
 
833
  plt.legend(loc='upper left', framealpha=1)
834
  plt.ylim((0,220))
835
  plt.xlim((0,250))
836
+ #plt.title('Simulated LV Pressure Volume Loop', fontsize=16)
837
 
838
  return plt, round(ef_nolvad,2), round(new_ef,2), round(co_nolvad,2), round(CO, 2)
839
 
 
900
  sl7 = gr.Slider(0.0, 280.0, value= 140., label="start_v (ml)")
901
 
902
  with gr.Row():
903
+ simulation = gr.PlayableVideo(autoplay='true',loop='true',width=300,height=300) # gr.Plot()
904
 
905
  gr.Markdown(description3)
906
 
 
910
  beta = gr.Slider(.4, 1.0, value= 1.4, label="Pump speed parameter:")
911
 
912
  with gr.Row():
913
+ lvad = gr.PlayableVideo(autoplay='true',loop='true',width=300,height=300) # gr.Plot()
914
 
915
  with gr.Row():
916
  EF_o = gr.Number(label="Ejection fraction (EF) before LVAD:")