Commit
·
05f5906
1
Parent(s):
aa3a210
Update app.py
Browse files
app.py
CHANGED
@@ -34,12 +34,13 @@ def one_shot(image,input_text,gender):
|
|
34 |
sound = AudioSegment.from_file(f.name, format="mp3")
|
35 |
sound.export("/content/audio.wav", format="wav")
|
36 |
waveform, sample_rate = torchaudio.load("/content/audio.wav")
|
37 |
-
return image
|
38 |
|
39 |
torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
|
40 |
image = Image.open(image_in)
|
41 |
image = pad_image(image)
|
42 |
image.save("/content/image_pre.png")
|
|
|
|
|
43 |
print("Print 2")
|
44 |
return "/content/image_pre.png"
|
45 |
exit()
|
|
|
34 |
sound = AudioSegment.from_file(f.name, format="mp3")
|
35 |
sound.export("/content/audio.wav", format="wav")
|
36 |
waveform, sample_rate = torchaudio.load("/content/audio.wav")
|
|
|
37 |
|
38 |
torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
|
39 |
image = Image.open(image_in)
|
40 |
image = pad_image(image)
|
41 |
image.save("/content/image_pre.png")
|
42 |
+
return image
|
43 |
+
exit()
|
44 |
print("Print 2")
|
45 |
return "/content/image_pre.png"
|
46 |
exit()
|