Franny Dean commited on
Commit
47df762
·
1 Parent(s): 8c35f57

html attempt

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +2 -2
  2. app.py +2 -2
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -771,7 +771,7 @@ def generate_example():
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
- animated = "prediction.gif" # <img src="programming.gif" alt="Computer man" style="width:48px;height:48px;">
775
  return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
776
 
777
 
@@ -853,7 +853,7 @@ with gr.Blocks() as demo:
853
  generate_button = gr.Button("Load sample echocardiogram and generate result")
854
  with gr.Row():
855
  video = gr.PlayableVideo(autoplay=True) #format="avi"
856
- plot = gr.PlayableVideo(autoplay=True) # gr.HTML()
857
 
858
  with gr.Row():
859
  Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
 
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
+ animated = "<img src='programming.gif' alt='pv_loop'>" # "prediction.gif" # style="width:48px;height:48px;"
775
  return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
776
 
777
 
 
853
  generate_button = gr.Button("Load sample echocardiogram and generate result")
854
  with gr.Row():
855
  video = gr.PlayableVideo(autoplay=True) #format="avi"
856
+ plot = gr.HTML() # gr.PlayableVideo(autoplay=True)
857
 
858
  with gr.Row():
859
  Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
app.py CHANGED
@@ -771,7 +771,7 @@ def generate_example():
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
- animated = "prediction.gif" # <img src="programming.gif" alt="Computer man" style="width:48px;height:48px;">
775
  return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
776
 
777
 
@@ -853,7 +853,7 @@ with gr.Blocks() as demo:
853
  generate_button = gr.Button("Load sample echocardiogram and generate result")
854
  with gr.Row():
855
  video = gr.PlayableVideo(autoplay=True) #format="avi"
856
- plot = gr.PlayableVideo(autoplay=True) # gr.HTML()
857
 
858
  with gr.Row():
859
  Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")
 
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
+ animated = "<img src='programming.gif' alt='pv_loop'>" # "prediction.gif" # style="width:48px;height:48px;"
775
  return video, animated, Rm, Ra, Emax, Emin, Vd, Tc, start_v
776
 
777
 
 
853
  generate_button = gr.Button("Load sample echocardiogram and generate result")
854
  with gr.Row():
855
  video = gr.PlayableVideo(autoplay=True) #format="avi"
856
+ plot = gr.HTML() # gr.PlayableVideo(autoplay=True)
857
 
858
  with gr.Row():
859
  Rm = gr.Number(label="Mitral valve circuit resistance (Rm) mmHg*s/ml:")