pragnakalp commited on
Commit
51d1c96
·
1 Parent(s): 55844f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -139,20 +139,20 @@ def calculate(image_in, audio_in):
139
 
140
  def one_shot_talking(image_in,audio_in):
141
 
142
- image = Image.open(image_in)
143
- image = crop_src_image(image)
144
- image.save("image_pre.png")
145
- #Pre-processing of image
146
- # crop_src_image(image_in)
147
 
148
- exit()
149
  #Improve quality of input image
150
- os.system(f"python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/image_pre.png -o /content/results --bg_upsampler realesrgan")
151
 
152
- image_in_one_shot='/content/results/restored_imgs/image_pre.png'
153
 
154
  #One Shot Talking Face algorithm
155
- calculate(image_in_one_shot,audio_in)
156
 
157
  #Video Quality Improvement
158
 
@@ -220,7 +220,7 @@ def run():
220
  # audio_in = gr.Audio(show_label=False, type='filepath')
221
  input_text=gr.Textbox(lines=3, value="Hello How are you?", label="Input Text")
222
  gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
223
- video_out = gr.Image(label="output")
224
  # video_out = gr.Video(show_label=False)
225
  with gr.Row().style(equal_height=True):
226
  btn = gr.Button("Generate")
 
139
 
140
  def one_shot_talking(image_in,audio_in):
141
 
142
+ # image = Image.open(image_in)
143
+ # image = crop_src_image(image)
144
+ # image.save("image_pre.png")
145
+ # #Pre-processing of image
146
+ # # crop_src_image(image_in)
147
 
148
+ # exit()
149
  #Improve quality of input image
150
+ # os.system(f"python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/image_pre.png -o /content/results --bg_upsampler realesrgan")
151
 
152
+ # image_in_one_shot='/content/results/restored_imgs/image_pre.png'
153
 
154
  #One Shot Talking Face algorithm
155
+ calculate(image_in,audio_in)
156
 
157
  #Video Quality Improvement
158
 
 
220
  # audio_in = gr.Audio(show_label=False, type='filepath')
221
  input_text=gr.Textbox(lines=3, value="Hello How are you?", label="Input Text")
222
  gender = gr.Radio(["Female","Male"],value="Female",label="Gender")
223
+ video_out = gr.Video(label="output")
224
  # video_out = gr.Video(show_label=False)
225
  with gr.Row().style(equal_height=True):
226
  btn = gr.Button("Generate")