Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,8 +16,8 @@ print(cwd)
|
|
| 16 |
|
| 17 |
Hinton= "Geoffrey_Hinton.jpeg"
|
| 18 |
Lecun= "Yann_LeCun.jpeg"
|
| 19 |
-
|
| 20 |
-
|
| 21 |
Morph= "women_teaser.mp4" #video.mp4"
|
| 22 |
|
| 23 |
print(Lecun)
|
|
@@ -71,8 +71,8 @@ targets = gr.Image(label="Targets", value=target, type="pil")
|
|
| 71 |
with gr.Blocks(theme=gr.themes.Default(font=[gr.themes.GoogleFont("Inconsolata"), "Arial", "sans-serif"])) as demo:
|
| 72 |
gr.Markdown("Start choosing an input and target image for the morphing then click **Submit** to watch the output in slow motion.")
|
| 73 |
with gr.Row():
|
| 74 |
-
inp = gr.Image(label="Input", value=
|
| 75 |
-
target = gr.Image(label="Target", value=
|
| 76 |
out = gr.Image(label="Output") #width=int(frame_width/2),height=int(frame_height/3)) # width=ww, height=hh) # width=int(frame_width),height=int(frame_height))
|
| 77 |
|
| 78 |
slider= gr.Slider(1, 1000, value=300, label="Steps", info="Choose between 1 and 1000")
|
|
@@ -80,7 +80,7 @@ with gr.Blocks(theme=gr.themes.Default(font=[gr.themes.GoogleFont("Inconsolata")
|
|
| 80 |
btn.click(fn=morphing, inputs=[inp,target,slider], outputs=out)
|
| 81 |
gr.ClearButton([inp,target,slider,out])
|
| 82 |
gr.Examples(
|
| 83 |
-
examples=[[
|
| 84 |
inputs=[inp, target, slider],
|
| 85 |
outputs=out,
|
| 86 |
fn=morphing,
|
|
|
|
| 16 |
|
| 17 |
Hinton= "Geoffrey_Hinton.jpeg"
|
| 18 |
Lecun= "Yann_LeCun.jpeg"
|
| 19 |
+
w_target="woman_target_half.png"
|
| 20 |
+
w_source="woman_source_half.png"
|
| 21 |
Morph= "women_teaser.mp4" #video.mp4"
|
| 22 |
|
| 23 |
print(Lecun)
|
|
|
|
| 71 |
with gr.Blocks(theme=gr.themes.Default(font=[gr.themes.GoogleFont("Inconsolata"), "Arial", "sans-serif"])) as demo:
|
| 72 |
gr.Markdown("Start choosing an input and target image for the morphing then click **Submit** to watch the output in slow motion.")
|
| 73 |
with gr.Row():
|
| 74 |
+
inp = gr.Image(label="Input", value=w_source, type="pil") # width=int(frame_width),height=int(frame_height))
|
| 75 |
+
target = gr.Image(label="Target", value=w_target, type="pil") # width=ww, height=hh) # width=int(frame_width),height=int(frame_height))
|
| 76 |
out = gr.Image(label="Output") #width=int(frame_width/2),height=int(frame_height/3)) # width=ww, height=hh) # width=int(frame_width),height=int(frame_height))
|
| 77 |
|
| 78 |
slider= gr.Slider(1, 1000, value=300, label="Steps", info="Choose between 1 and 1000")
|
|
|
|
| 80 |
btn.click(fn=morphing, inputs=[inp,target,slider], outputs=out)
|
| 81 |
gr.ClearButton([inp,target,slider,out])
|
| 82 |
gr.Examples(
|
| 83 |
+
examples=[[w_source, w_target, 300], [w_source, w_target, 150]],
|
| 84 |
inputs=[inp, target, slider],
|
| 85 |
outputs=out,
|
| 86 |
fn=morphing,
|