Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,10 @@ audio_gen = gr.Blocks.load(name="spaces/fffiloni/audioldm-text-to-audio-generati
|
|
11 |
def infer(image_input, manual_caption):
|
12 |
if manual_caption == None:
|
13 |
cap = caption(image_input, fn_index=0)
|
|
|
14 |
else:
|
15 |
cap = manual_caption
|
|
|
16 |
sound = audio_gen(cap, 10, 2.5, 45, 3, fn_index=0)
|
17 |
|
18 |
return cap, sound[1], gr.Group.update(visible=True)
|
|
|
11 |
def infer(image_input, manual_caption):
|
12 |
if manual_caption == None:
|
13 |
cap = caption(image_input, fn_index=0)
|
14 |
+
print("gpt2 caption: " + cap)
|
15 |
else:
|
16 |
cap = manual_caption
|
17 |
+
print("manual caption: " + cap)
|
18 |
sound = audio_gen(cap, 10, 2.5, 45, 3, fn_index=0)
|
19 |
|
20 |
return cap, sound[1], gr.Group.update(visible=True)
|