pragnakalp commited on
Commit
2bc8f03
1 Parent(s): 010ab61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -139,11 +139,15 @@ def one_shot_talking(image_in,audio_in):
139
  crop_img=crop_src_image(image_in)
140
 
141
  # os.system(f"rm -rf /content/results/restored_imgs/image_pre.png")
 
 
 
 
142
  #Improve quality of input image
143
  os.system(f"python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/image_pre.png -o /content/results --bg_upsampler realesrgan")
144
  # time.sleep(60)
145
 
146
- image_in_one_shot='/content/results/restored_imgs/image_pre.png'
147
 
148
  #One Shot Talking Face algorithm
149
  calculate(image_in_one_shot,audio_in)
 
139
  crop_img=crop_src_image(image_in)
140
 
141
  # os.system(f"rm -rf /content/results/restored_imgs/image_pre.png")
142
+
143
+ if not os.path.exists( "/content/results" ):
144
+ os.makedirs("/content/results")
145
+
146
  #Improve quality of input image
147
  os.system(f"python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/image_pre.png -o /content/results --bg_upsampler realesrgan")
148
  # time.sleep(60)
149
 
150
+ image_in_one_shot='/content/results/image_pre.png'
151
 
152
  #One Shot Talking Face algorithm
153
  calculate(image_in_one_shot,audio_in)