pragnakalp commited on
Commit
82589e7
Β·
1 Parent(s): ef7cfb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -15
app.py CHANGED
@@ -204,29 +204,19 @@ def generate_ocr(method,image):
204
 
205
  def run():
206
  with block:
207
- gr.Markdown(
208
- """
209
- <style> body { text-align: right} </style>
210
- map: πŸ“„ [arxiv](https://arxiv.org/abs/2112.02749) &nbsp; ⇨ πŸ‘©β€πŸ’» [github](https://github.com/FuxiVirtualHuman/AAAI22-one-shot-talking-face) &nbsp; ⇨ πŸ¦’ [colab](https://github.com/camenduru/one-shot-talking-face-colab) &nbsp; ⇨ πŸ€— [huggingface](https://huggingface.co/spaces/camenduru/one-shot-talking-face) &nbsp; | &nbsp; tools: πŸŒ€ [duplicate this space](https://huggingface.co/spaces/camenduru/sandbox?duplicate=true) &nbsp; | 🐒 [tortoise tts](https://huggingface.co/spaces/mdnestor/tortoise) &nbsp; | πŸ“Ί [video upscaler](https://huggingface.co/spaces/kadirnar/Anime4k) &nbsp; | 🎨 [text-to-image](https://huggingface.co/models?pipeline_tag=text-to-image&sort=downloads) &nbsp; | 🐣 [twitter](https://twitter.com/camenduru) &nbsp; | β˜• [buy-a-coffee](https://ko-fi.com/camenduru) &nbsp;
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
- # examples = gr.Examples(examples=[
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