pragnakalp commited on
Commit
11879e6
·
1 Parent(s): d0bf7de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -90,7 +90,7 @@ def calculate(image_in, audio_in):
90
  torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
91
  image = Image.open(image_in)
92
  image = pad_image(image)
93
- os.system(f"rm -rf /content/image.png")
94
  image.save("image.png")
95
 
96
  pocketsphinx_run = subprocess.run(['pocketsphinx', '-phone_align', 'yes', 'single', '/content/audio.wav'], check=True, capture_output=True)
@@ -141,8 +141,9 @@ def one_shot_talking(image_in,audio_in):
141
  #Improve quality of input image
142
  os.system(f"python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/image_pre.png -o /content/results --bg_upsampler realesrgan")
143
  # time.sleep(60)
144
- image_in_one_shot='/content/results/restored_imgs/image_pre.png'
145
  os.system(f"rm -rf /content/results/restored_imgs/image_pre.png")
 
 
146
 
147
  #One Shot Talking Face algorithm
148
  calculate(image_in_one_shot,audio_in)
 
90
  torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
91
  image = Image.open(image_in)
92
  image = pad_image(image)
93
+ # os.system(f"rm -rf /content/image.png")
94
  image.save("image.png")
95
 
96
  pocketsphinx_run = subprocess.run(['pocketsphinx', '-phone_align', 'yes', 'single', '/content/audio.wav'], check=True, capture_output=True)
 
141
  #Improve quality of input image
142
  os.system(f"python /content/GFPGAN/inference_gfpgan.py --upscale 2 -i /content/image_pre.png -o /content/results --bg_upsampler realesrgan")
143
  # time.sleep(60)
 
144
  os.system(f"rm -rf /content/results/restored_imgs/image_pre.png")
145
+ image_in_one_shot='/content/results/restored_imgs/image_pre.png'
146
+
147
 
148
  #One Shot Talking Face algorithm
149
  calculate(image_in_one_shot,audio_in)