Spaces:
Running
Running
Franny Dean
commited on
Commit
•
08f83a6
1
Parent(s):
63b4c8a
reverting to video html doesnt work
Browse files- .ipynb_checkpoints/app-checkpoint.py +9 -9
- app.py +9 -9
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -770,13 +770,13 @@ def generate_example():
|
|
770 |
video = f"EchoNet-Dynamic/Videos/{filename}"
|
771 |
|
772 |
plot, Rm, Ra, Emax, Emin, Vd,Tc, start_v = pvloop_simulator(Rm=round(results[4].item(),2), Ra=round(results[5].item(),2), Emax=round(results[2].item(),2), Emin=round(results[3].item(),2), Vd=round(results[6].item(),2), Tc=round(results[0].item(),2), start_v=round(results[1].item(),2))
|
773 |
-
|
774 |
-
video = f"""<video height='500' width='500' autoplay loop muted>
|
775 |
-
<source src={video_file} type='video/mp4'/>
|
776 |
-
</video>"""
|
777 |
-
animated = """<video height='500' width='500' autoplay loop muted>
|
778 |
-
|
779 |
-
|
780 |
return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
781 |
|
782 |
|
@@ -857,8 +857,8 @@ with gr.Blocks() as demo:
|
|
857 |
|
858 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
859 |
with gr.Row():
|
860 |
-
video = gr.
|
861 |
-
plot = gr.
|
862 |
|
863 |
with gr.Row():
|
864 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|
|
|
770 |
video = f"EchoNet-Dynamic/Videos/{filename}"
|
771 |
|
772 |
plot, Rm, Ra, Emax, Emin, Vd,Tc, start_v = pvloop_simulator(Rm=round(results[4].item(),2), Ra=round(results[5].item(),2), Emax=round(results[2].item(),2), Emin=round(results[3].item(),2), Vd=round(results[6].item(),2), Tc=round(results[0].item(),2), start_v=round(results[1].item(),2))
|
773 |
+
video = video.replace("avi", "mp4")
|
774 |
+
#video = f"""<video height='500' width='500' autoplay loop muted>
|
775 |
+
# <source src={video_file} type='video/mp4'/>
|
776 |
+
# </video>"""
|
777 |
+
animated = "prediction.mp4" # """<video height='500' width='500' autoplay loop muted>
|
778 |
+
# <source src='prediction.mp4' type='video/mp4'/>
|
779 |
+
# </video>""" # style="width:48px;height:48px;" # "<img src='prediction.gif' alt='pv_loop'>" # "prediction.mp4"
|
780 |
return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
781 |
|
782 |
|
|
|
857 |
|
858 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
859 |
with gr.Row():
|
860 |
+
video = gr.PlayableVideo(autoplay=True) # gr.HTML() #
|
861 |
+
plot = gr.PlayableVideo(autoplay=True) # gr.HTML() #
|
862 |
|
863 |
with gr.Row():
|
864 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|
app.py
CHANGED
@@ -770,13 +770,13 @@ def generate_example():
|
|
770 |
video = f"EchoNet-Dynamic/Videos/{filename}"
|
771 |
|
772 |
plot, Rm, Ra, Emax, Emin, Vd,Tc, start_v = pvloop_simulator(Rm=round(results[4].item(),2), Ra=round(results[5].item(),2), Emax=round(results[2].item(),2), Emin=round(results[3].item(),2), Vd=round(results[6].item(),2), Tc=round(results[0].item(),2), start_v=round(results[1].item(),2))
|
773 |
-
|
774 |
-
video = f"""<video height='500' width='500' autoplay loop muted>
|
775 |
-
<source src={video_file} type='video/mp4'/>
|
776 |
-
</video>"""
|
777 |
-
animated = """<video height='500' width='500' autoplay loop muted>
|
778 |
-
|
779 |
-
|
780 |
return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
781 |
|
782 |
|
@@ -857,8 +857,8 @@ with gr.Blocks() as demo:
|
|
857 |
|
858 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
859 |
with gr.Row():
|
860 |
-
video = gr.
|
861 |
-
plot = gr.
|
862 |
|
863 |
with gr.Row():
|
864 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|
|
|
770 |
video = f"EchoNet-Dynamic/Videos/{filename}"
|
771 |
|
772 |
plot, Rm, Ra, Emax, Emin, Vd,Tc, start_v = pvloop_simulator(Rm=round(results[4].item(),2), Ra=round(results[5].item(),2), Emax=round(results[2].item(),2), Emin=round(results[3].item(),2), Vd=round(results[6].item(),2), Tc=round(results[0].item(),2), start_v=round(results[1].item(),2))
|
773 |
+
video = video.replace("avi", "mp4")
|
774 |
+
#video = f"""<video height='500' width='500' autoplay loop muted>
|
775 |
+
# <source src={video_file} type='video/mp4'/>
|
776 |
+
# </video>"""
|
777 |
+
animated = "prediction.mp4" # """<video height='500' width='500' autoplay loop muted>
|
778 |
+
# <source src='prediction.mp4' type='video/mp4'/>
|
779 |
+
# </video>""" # style="width:48px;height:48px;" # "<img src='prediction.gif' alt='pv_loop'>" # "prediction.mp4"
|
780 |
return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
|
781 |
|
782 |
|
|
|
857 |
|
858 |
generate_button = gr.Button("Load sample echocardiogram and generate result")
|
859 |
with gr.Row():
|
860 |
+
video = gr.PlayableVideo(autoplay=True) # gr.HTML() #
|
861 |
+
plot = gr.PlayableVideo(autoplay=True) # gr.HTML() #
|
862 |
|
863 |
with gr.Row():
|
864 |
Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
|