Spaces:
Build error
Build error
Pie31415
commited on
Commit
·
bf108da
1
Parent(s):
82f7ab5
updated app
Browse files- app.py +15 -8
- examples/log.csv +0 -1
app.py
CHANGED
|
@@ -132,21 +132,28 @@ def video_inference():
|
|
| 132 |
pass
|
| 133 |
|
| 134 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
| 135 |
with gr.Tab("Image Inference"):
|
| 136 |
with gr.Row():
|
| 137 |
-
|
| 138 |
-
|
|
|
|
| 139 |
image_button = gr.Button("Predict")
|
| 140 |
with gr.Tab("Video Inference"):
|
| 141 |
video_inputs = [gr.Video(), gr.Image()]
|
| 142 |
pass
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
)
|
| 149 |
|
| 150 |
-
image_button.click(image_inference, inputs=
|
| 151 |
|
| 152 |
demo.launch()
|
|
|
|
| 132 |
pass
|
| 133 |
|
| 134 |
with gr.Blocks() as demo:
|
| 135 |
+
gr.Markdown("# **<p align='center'>ROME: Realistic one-shot mesh-based head avatars</p>**")
|
| 136 |
+
|
| 137 |
with gr.Tab("Image Inference"):
|
| 138 |
with gr.Row():
|
| 139 |
+
source_img = gr.Image(type="pil")
|
| 140 |
+
driver_img = gr.Image(type="pil")
|
| 141 |
+
image_output = gr.Image()
|
| 142 |
image_button = gr.Button("Predict")
|
| 143 |
with gr.Tab("Video Inference"):
|
| 144 |
video_inputs = [gr.Video(), gr.Image()]
|
| 145 |
pass
|
| 146 |
+
|
| 147 |
+
gr.Examples(
|
| 148 |
+
examples=[
|
| 149 |
+
["./examples/lincoln.jpg"],
|
| 150 |
+
["./examples/lincoln.jpg"]
|
| 151 |
+
],
|
| 152 |
+
inputs=[source_img, driver_img],
|
| 153 |
+
fn=image_inference,
|
| 154 |
+
cache_examples=True
|
| 155 |
)
|
| 156 |
|
| 157 |
+
image_button.click(image_inference, inputs=[source_img, driver_img], outputs=image_output)
|
| 158 |
|
| 159 |
demo.launch()
|
examples/log.csv
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
"examples/lincoln.jpg", "examples/taras2.jpg"
|
|
|
|
|
|