pragnakalp commited on
Commit
1b4bfa7
β€’
1 Parent(s): 54e8fcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -2
app.py CHANGED
@@ -10,5 +10,30 @@ def greet(n):
10
  print(zero.device) # <-- 'cuda:0' πŸ€—
11
  return f"Hello {zero + n} Tensor"
12
 
13
- demo = gr.Interface(fn=greet, inputs=gr.Number(), outputs=gr.Text())
14
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  print(zero.device) # <-- 'cuda:0' πŸ€—
11
  return f"Hello {zero + n} Tensor"
12
 
13
+ def run():
14
+ with gr.Blocks(css=".gradio-container {background-color: lightgray} #radio_div {background-color: #FFD8B4; font-size: 40px;}") as demo:
15
+ gr.Markdown("<h1 style='text-align: center;'>"+ "One Shot Talking Face from Text" + "</h1><br/><br/>")
16
+ with gr.Group():
17
+ # with gr.Box():
18
+ with gr.Row():
19
+ # with gr.Row().style(equal_height=True):
20
+ image_in = gr.Image(show_label=True, type="filepath",label="Input Image")
21
+ input_text = gr.Textbox(show_label=True,label="Input Text")
22
+ gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
23
+ video_out = gr.Video(show_label=True,label="Output")
24
+ with gr.Row():
25
+ # with gr.Row().style(equal_height=True):
26
+ btn = gr.Button("Generate")
27
+ # gr.Markdown(
28
+ # """
29
+ # <p style='text-align: center;'>Feel free to give us your thoughts on this demo and please contact us at
30
+ # <a href="mailto:[email protected]" target="_blank">[email protected]</a>
31
+ # <p style='text-align: center;'>Developed by: <a href="https://www.pragnakalp.com" target="_blank">Pragnakalp Techlabs</a></p>
32
+
33
+ # """)
34
+
35
+ btn.click(one_shot, inputs=[image_in,input_text,gender], outputs=[video_out])
36
+ demo.queue()
37
+
38
+ if __name__ == "__main__":
39
+ run()