pragnakalp commited on
Commit
dc9f4fe
·
1 Parent(s): 2995688

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -35,7 +35,9 @@ def calculate(image_in, audio_in):
35
  return "/content/train/image_audio.mp4"
36
 
37
  def one_shot(image_in,audio_in):
38
- return calculate(image_in,audio_in)
 
 
39
  def run():
40
  with block:
41
 
@@ -44,12 +46,13 @@ def run():
44
  with gr.Row().style(equal_height=True):
45
  image_in = gr.Image(show_label=False, type="filepath")
46
  audio_in = gr.Audio(show_label=False, type='filepath')
 
47
  video_out = gr.Video(show_label=False)
48
  with gr.Row().style(equal_height=True):
49
  btn = gr.Button("Generate")
50
 
51
 
52
- btn.click(one_shot, inputs=[image_in, audio_in], outputs=[video_out])
53
  block.queue()
54
  block.launch(server_name="0.0.0.0", server_port=7860)
55
 
 
35
  return "/content/train/image_audio.mp4"
36
 
37
  def one_shot(image_in,audio_in):
38
+ if gender == 'Female' or gender == 'female':
39
+ return calculate(image_in,audio_in
40
+
41
  def run():
42
  with block:
43
 
 
46
  with gr.Row().style(equal_height=True):
47
  image_in = gr.Image(show_label=False, type="filepath")
48
  audio_in = gr.Audio(show_label=False, type='filepath')
49
+ gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
50
  video_out = gr.Video(show_label=False)
51
  with gr.Row().style(equal_height=True):
52
  btn = gr.Button("Generate")
53
 
54
 
55
+ btn.click(one_shot, inputs=[image_in, audio_in,gender], outputs=[video_out])
56
  block.queue()
57
  block.launch(server_name="0.0.0.0", server_port=7860)
58