Franny Dean commited on
Commit
238988e
1 Parent(s): 64db3e2

new description

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +11 -4
  2. app.py +11 -4
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -463,7 +463,8 @@ def pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=True):
463
  end = (N)*60000
464
  if animate:
465
  line = ax.plot(volumes[start:(start+1)], pressures[start:(start+1)], lw=1, color='b')
466
- point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5)
 
467
  else:
468
  line = ax.plot(volumes[start:end], pressures[start:end], lw=1, color='b')
469
 
@@ -523,7 +524,11 @@ description = """
523
  <p style='text-align: center'> Keying Kuang, Frances Dean, Jack B. Jedlicki, David Ouyang, Anthony Philippakis, David Sontag, Ahmed Alaa <br></p>
524
  <p> We develop methodology for predicting digital twins from non-invasive cardiac ultrasound images in <a href='https://arxiv.org/abs/2403.00177'>Non-Invasive Medical Digital Twins using Physics-Informed Self-Supervised Learning</a>. Check out our <a href='https://github.com/AlaaLab/CardioPINN' target='_blank'>code.</a> \n \n
525
  We demonstrate the ability of our model to predict left ventricular pressure-volume loops using image data here. To run example predictions on samples from the <a href='https://echonet.github.io/dynamic/'>EchoNet</a> dataset, click the first button. \n \n
526
- Below you can input values of predicted parameters and output a simulated pressure-volume loop predicted by the <a href='https://ieeexplore.ieee.org/document/4729737/keywords#keywords'>Simaan et al 2008</a> hydraulic analogy model by pressing 'Run simulation.'</p>
 
 
 
 
527
  """
528
 
529
  gr.Markdown(title)
@@ -551,9 +556,11 @@ with gr.Blocks() as demo:
551
  Vd = gr.Number(label="Theoretical zero pressure volume (Vd) ml:")
552
  Tc = gr.Number(label="Cycle duration (Tc) s:")
553
  start_v = gr.Number(label="Initial volume (start_v) ml:")
554
-
555
- simulation_button = gr.Button("Run simulation")
 
556
 
 
557
 
558
 
559
  with gr.Row():
 
463
  end = (N)*60000
464
  if animate:
465
  line = ax.plot(volumes[start:(start+1)], pressures[start:(start+1)], lw=1, color='b')
466
+ point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5)#, label='End Diastole')
467
+ #point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5, label='End Systole')
468
  else:
469
  line = ax.plot(volumes[start:end], pressures[start:end], lw=1, color='b')
470
 
 
524
  <p style='text-align: center'> Keying Kuang, Frances Dean, Jack B. Jedlicki, David Ouyang, Anthony Philippakis, David Sontag, Ahmed Alaa <br></p>
525
  <p> We develop methodology for predicting digital twins from non-invasive cardiac ultrasound images in <a href='https://arxiv.org/abs/2403.00177'>Non-Invasive Medical Digital Twins using Physics-Informed Self-Supervised Learning</a>. Check out our <a href='https://github.com/AlaaLab/CardioPINN' target='_blank'>code.</a> \n \n
526
  We demonstrate the ability of our model to predict left ventricular pressure-volume loops using image data here. To run example predictions on samples from the <a href='https://echonet.github.io/dynamic/'>EchoNet</a> dataset, click the first button. \n \n
527
+ </p>
528
+ """
529
+
530
+ description2 = """\n \n
531
+ Our model uses a hydraulic analogy model of cardiac function from <a href='https://ieeexplore.ieee.org/document/4729737/keywords#keywords'>Simaan et al 2008</a>. Below you can input values of predicted parameters and output a simulated pressure-volume loop predicted from the <a href='https://ieeexplore.ieee.org/document/4729737/keywords#keywords'>Simaan et al 2008</a> model, which is an ordinary differential equation. Tune parameters and press 'Run simulation.'
532
  """
533
 
534
  gr.Markdown(title)
 
556
  Vd = gr.Number(label="Theoretical zero pressure volume (Vd) ml:")
557
  Tc = gr.Number(label="Cycle duration (Tc) s:")
558
  start_v = gr.Number(label="Initial volume (start_v) ml:")
559
+
560
+
561
+ gr.Markdown(description2)
562
 
563
+ simulation_button = gr.Button("Run simulation")
564
 
565
 
566
  with gr.Row():
app.py CHANGED
@@ -463,7 +463,8 @@ def pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=True):
463
  end = (N)*60000
464
  if animate:
465
  line = ax.plot(volumes[start:(start+1)], pressures[start:(start+1)], lw=1, color='b')
466
- point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5)
 
467
  else:
468
  line = ax.plot(volumes[start:end], pressures[start:end], lw=1, color='b')
469
 
@@ -523,7 +524,11 @@ description = """
523
  <p style='text-align: center'> Keying Kuang, Frances Dean, Jack B. Jedlicki, David Ouyang, Anthony Philippakis, David Sontag, Ahmed Alaa <br></p>
524
  <p> We develop methodology for predicting digital twins from non-invasive cardiac ultrasound images in <a href='https://arxiv.org/abs/2403.00177'>Non-Invasive Medical Digital Twins using Physics-Informed Self-Supervised Learning</a>. Check out our <a href='https://github.com/AlaaLab/CardioPINN' target='_blank'>code.</a> \n \n
525
  We demonstrate the ability of our model to predict left ventricular pressure-volume loops using image data here. To run example predictions on samples from the <a href='https://echonet.github.io/dynamic/'>EchoNet</a> dataset, click the first button. \n \n
526
- Below you can input values of predicted parameters and output a simulated pressure-volume loop predicted by the <a href='https://ieeexplore.ieee.org/document/4729737/keywords#keywords'>Simaan et al 2008</a> hydraulic analogy model by pressing 'Run simulation.'</p>
 
 
 
 
527
  """
528
 
529
  gr.Markdown(title)
@@ -551,9 +556,11 @@ with gr.Blocks() as demo:
551
  Vd = gr.Number(label="Theoretical zero pressure volume (Vd) ml:")
552
  Tc = gr.Number(label="Cycle duration (Tc) s:")
553
  start_v = gr.Number(label="Initial volume (start_v) ml:")
554
-
555
- simulation_button = gr.Button("Run simulation")
 
556
 
 
557
 
558
 
559
  with gr.Row():
 
463
  end = (N)*60000
464
  if animate:
465
  line = ax.plot(volumes[start:(start+1)], pressures[start:(start+1)], lw=1, color='b')
466
+ point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5)#, label='End Diastole')
467
+ #point = ax.scatter(volumes[start:(start+1)], pressures[start:(start+1)], c="b", s=5, label='End Systole')
468
  else:
469
  line = ax.plot(volumes[start:end], pressures[start:end], lw=1, color='b')
470
 
 
524
  <p style='text-align: center'> Keying Kuang, Frances Dean, Jack B. Jedlicki, David Ouyang, Anthony Philippakis, David Sontag, Ahmed Alaa <br></p>
525
  <p> We develop methodology for predicting digital twins from non-invasive cardiac ultrasound images in <a href='https://arxiv.org/abs/2403.00177'>Non-Invasive Medical Digital Twins using Physics-Informed Self-Supervised Learning</a>. Check out our <a href='https://github.com/AlaaLab/CardioPINN' target='_blank'>code.</a> \n \n
526
  We demonstrate the ability of our model to predict left ventricular pressure-volume loops using image data here. To run example predictions on samples from the <a href='https://echonet.github.io/dynamic/'>EchoNet</a> dataset, click the first button. \n \n
527
+ </p>
528
+ """
529
+
530
+ description2 = """\n \n
531
+ Our model uses a hydraulic analogy model of cardiac function from <a href='https://ieeexplore.ieee.org/document/4729737/keywords#keywords'>Simaan et al 2008</a>. Below you can input values of predicted parameters and output a simulated pressure-volume loop predicted from the <a href='https://ieeexplore.ieee.org/document/4729737/keywords#keywords'>Simaan et al 2008</a> model, which is an ordinary differential equation. Tune parameters and press 'Run simulation.'
532
  """
533
 
534
  gr.Markdown(title)
 
556
  Vd = gr.Number(label="Theoretical zero pressure volume (Vd) ml:")
557
  Tc = gr.Number(label="Cycle duration (Tc) s:")
558
  start_v = gr.Number(label="Initial volume (start_v) ml:")
559
+
560
+
561
+ gr.Markdown(description2)
562
 
563
+ simulation_button = gr.Button("Run simulation")
564
 
565
 
566
  with gr.Row():