pragnakalp commited on
Commit
631b921
·
1 Parent(s): 33d1219

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -7
app.py CHANGED
@@ -198,22 +198,29 @@ def one_shot(image_in,input_text,gender):
198
 
199
 
200
  def run():
201
- with block:
202
-
203
  with gr.Group():
204
  with gr.Box():
205
  with gr.Row().style(equal_height=True):
206
  image_in = gr.Image(show_label=True, type="filepath",label="Input Image")
207
  input_text = gr.Textbox(show_label=True,label="Input Text")
208
  gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
209
- video_out = gr.Video(show_label=True,label="Output")
210
  with gr.Row().style(equal_height=True):
211
- btn = gr.Button("Generate")
 
 
 
 
 
 
 
212
 
213
-
214
  btn.click(one_shot, inputs=[image_in,input_text,gender], outputs=[video_out])
215
- block.queue()
216
- block.launch(server_name="0.0.0.0", server_port=7860)
 
217
 
218
  if __name__ == "__main__":
219
  run()
 
198
 
199
 
200
  def run():
201
+ with gr.Blocks(css=".gradio-container {background-color: lightgray} #radio_div {background-color: #FFD8B4; font-size: 40px;}") as demo:
202
+ gr.Markdown("<h1 style='text-align: center;'>"+ "One Shot Talking Face from Text" + "</h1><br/><br/>")
203
  with gr.Group():
204
  with gr.Box():
205
  with gr.Row().style(equal_height=True):
206
  image_in = gr.Image(show_label=True, type="filepath",label="Input Image")
207
  input_text = gr.Textbox(show_label=True,label="Input Text")
208
  gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
209
+ video_out = gr.Textbox(show_label=True,label="Output")
210
  with gr.Row().style(equal_height=True):
211
+ btn = gr.Button("Generate")
212
+ gr.Markdown(
213
+ """
214
+ <p style='text-align: center;'>Feel free to give us your thoughts on this demo and please contact us at
215
+ <a href="mailto:letstalk@pragnakalp.com" target="_blank">letstalk@pragnakalp.com</a>
216
+ <p style='text-align: center;'>Developed by: <a href="https://www.pragnakalp.com" target="_blank">Pragnakalp Techlabs</a></p>
217
+
218
+ """)
219
 
 
220
  btn.click(one_shot, inputs=[image_in,input_text,gender], outputs=[video_out])
221
+ demo.queue()
222
+ demo.launch(server_name="0.0.0.0", server_port=7860)
223
+
224
 
225
  if __name__ == "__main__":
226
  run()