Commit
Β·
82589e7
1
Parent(s):
ef7cfb3
Update app.py
Browse files
app.py
CHANGED
@@ -204,29 +204,19 @@ def generate_ocr(method,image):
|
|
204 |
|
205 |
def run():
|
206 |
with block:
|
207 |
-
|
208 |
-
"""
|
209 |
-
<style> body { text-align: right} </style>
|
210 |
-
map: π [arxiv](https://arxiv.org/abs/2112.02749) β¨ π©βπ» [github](https://github.com/FuxiVirtualHuman/AAAI22-one-shot-talking-face) β¨ π¦ [colab](https://github.com/camenduru/one-shot-talking-face-colab) β¨ π€ [huggingface](https://huggingface.co/spaces/camenduru/one-shot-talking-face) | tools: π [duplicate this space](https://huggingface.co/spaces/camenduru/sandbox?duplicate=true) | π’ [tortoise tts](https://huggingface.co/spaces/mdnestor/tortoise) | πΊ [video upscaler](https://huggingface.co/spaces/kadirnar/Anime4k) | π¨ [text-to-image](https://huggingface.co/models?pipeline_tag=text-to-image&sort=downloads) | π£ [twitter](https://twitter.com/camenduru) | β [buy-a-coffee](https://ko-fi.com/camenduru)
|
211 |
-
""")
|
212 |
with gr.Group():
|
213 |
with gr.Box():
|
214 |
with gr.Row().style(equal_height=True):
|
215 |
image_in = gr.Image(show_label=False, type="filepath")
|
216 |
-
audio_in = gr.Audio(show_label=False, type='filepath')
|
|
|
|
|
217 |
video_out = gr.Video(show_label=False)
|
218 |
with gr.Row().style(equal_height=True):
|
219 |
btn = gr.Button("Generate")
|
220 |
|
221 |
-
|
222 |
-
# ["./examples/monalisa.jpg", "./examples/obama2.wav"],
|
223 |
-
# ["./examples/monalisa.jpg", "./examples/trump.wav"],
|
224 |
-
# ["./examples/o2.jpg", "./examples/obama2.wav"],
|
225 |
-
# ["./examples/o2.jpg", "./examples/trump.wav" ],
|
226 |
-
# ["./examples/image.png", "./examples/audio.wav"],
|
227 |
-
# ], fn=calculate, inputs=[image_in, audio_in], outputs=[video_out], cache_examples=True)
|
228 |
-
|
229 |
-
btn.click(generate_ocr, inputs=[image_in, audio_in], outputs=[video_out])
|
230 |
block.queue()
|
231 |
block.launch(server_name="0.0.0.0", server_port=7860)
|
232 |
|
|
|
204 |
|
205 |
def run():
|
206 |
with block:
|
207 |
+
|
|
|
|
|
|
|
|
|
208 |
with gr.Group():
|
209 |
with gr.Box():
|
210 |
with gr.Row().style(equal_height=True):
|
211 |
image_in = gr.Image(show_label=False, type="filepath")
|
212 |
+
# audio_in = gr.Audio(show_label=False, type='filepath')
|
213 |
+
input_text=gr.Textbox(lines=3, value="Hello How are you?", label="Input Text")
|
214 |
+
gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
|
215 |
video_out = gr.Video(show_label=False)
|
216 |
with gr.Row().style(equal_height=True):
|
217 |
btn = gr.Button("Generate")
|
218 |
|
219 |
+
btn.click(one_shot, inputs=[image_in, input_text,gender], outputs=[video_out])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
block.queue()
|
221 |
block.launch(server_name="0.0.0.0", server_port=7860)
|
222 |
|