Spaces:
Running
Running
Franny Dean
commited on
Commit
•
9b9815d
1
Parent(s):
759b0ed
add autoplay attempt and increase length
Browse files- .ipynb_checkpoints/app-checkpoint.py +3 -3
- app.py +3 -3
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -484,7 +484,7 @@ def pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=True):
|
|
484 |
ax.plot(x, y, lw=1, c='b')
|
485 |
|
486 |
if animate:
|
487 |
-
anim = animation.FuncAnimation(fig, partial(update), frames=
|
488 |
anim.save("prediction.mp4")
|
489 |
|
490 |
return plt, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
@@ -540,8 +540,8 @@ with gr.Blocks() as demo:
|
|
540 |
|
541 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
542 |
with gr.Row():
|
543 |
-
video = gr.PlayableVideo() #format="avi"
|
544 |
-
plot = gr.PlayableVideo()
|
545 |
|
546 |
with gr.Row():
|
547 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|
|
|
484 |
ax.plot(x, y, lw=1, c='b')
|
485 |
|
486 |
if animate:
|
487 |
+
anim = animation.FuncAnimation(fig, partial(update), frames=100, interval=10)
|
488 |
anim.save("prediction.mp4")
|
489 |
|
490 |
return plt, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
|
|
540 |
|
541 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
542 |
with gr.Row():
|
543 |
+
video = gr.PlayableVideo(autoplay=True) #format="avi"
|
544 |
+
plot = gr.PlayableVideo(autoplay=True)
|
545 |
|
546 |
with gr.Row():
|
547 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|
app.py
CHANGED
@@ -484,7 +484,7 @@ def pvloop_simulator(Rm, Ra, Emax, Emin, Vd, Tc, start_v, animate=True):
|
|
484 |
ax.plot(x, y, lw=1, c='b')
|
485 |
|
486 |
if animate:
|
487 |
-
anim = animation.FuncAnimation(fig, partial(update), frames=
|
488 |
anim.save("prediction.mp4")
|
489 |
|
490 |
return plt, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
@@ -540,8 +540,8 @@ with gr.Blocks() as demo:
|
|
540 |
|
541 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
542 |
with gr.Row():
|
543 |
-
video = gr.PlayableVideo() #format="avi"
|
544 |
-
plot = gr.PlayableVideo()
|
545 |
|
546 |
with gr.Row():
|
547 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|
|
|
484 |
ax.plot(x, y, lw=1, c='b')
|
485 |
|
486 |
if animate:
|
487 |
+
anim = animation.FuncAnimation(fig, partial(update), frames=100, interval=10)
|
488 |
anim.save("prediction.mp4")
|
489 |
|
490 |
return plt, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
|
|
540 |
|
541 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
542 |
with gr.Row():
|
543 |
+
video = gr.PlayableVideo(autoplay=True) #format="avi"
|
544 |
+
plot = gr.PlayableVideo(autoplay=True)
|
545 |
|
546 |
with gr.Row():
|
547 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|