Spaces:
Running
Running
add api call info bubbles
Browse files
app.py
CHANGED
@@ -26,6 +26,7 @@ def extract_audio(video_in):
|
|
26 |
return 'audio.wav'
|
27 |
|
28 |
def get_caption_from_kosmos(image_in):
|
|
|
29 |
kosmos2_client = Client("fffiloni/Kosmos-2-API", hf_token=hf_token)
|
30 |
kosmos2_result = kosmos2_client.predict(
|
31 |
image_input=handle_file(image_in),
|
@@ -86,6 +87,7 @@ def get_magnet(prompt):
|
|
86 |
raise gr.Error("MAGNet space API is not ready, please try again in few minutes ")
|
87 |
|
88 |
def get_audioldm(prompt):
|
|
|
89 |
try:
|
90 |
client = Client("fffiloni/audioldm2-text2audio-text2music-API", hf_token=hf_token)
|
91 |
seed = random.randint(0, MAX_SEED)
|
@@ -117,6 +119,7 @@ def get_audiogen(prompt):
|
|
117 |
raise gr.Error("AudioGen space API is not ready, please try again in few minutes ")
|
118 |
|
119 |
def get_tango(prompt):
|
|
|
120 |
try:
|
121 |
client = Client("fffiloni/tango", hf_token=hf_token)
|
122 |
result = client.predict(
|
@@ -150,6 +153,7 @@ def get_tango2(prompt):
|
|
150 |
|
151 |
|
152 |
def get_stable_audio_open(prompt):
|
|
|
153 |
try:
|
154 |
client = Client("fffiloni/Stable-Audio-Open-A10", hf_token=hf_token)
|
155 |
result = client.predict(
|
|
|
26 |
return 'audio.wav'
|
27 |
|
28 |
def get_caption_from_kosmos(image_in):
|
29 |
+
gr.Info("Generating image caption with Kosmos2...")
|
30 |
kosmos2_client = Client("fffiloni/Kosmos-2-API", hf_token=hf_token)
|
31 |
kosmos2_result = kosmos2_client.predict(
|
32 |
image_input=handle_file(image_in),
|
|
|
87 |
raise gr.Error("MAGNet space API is not ready, please try again in few minutes ")
|
88 |
|
89 |
def get_audioldm(prompt):
|
90 |
+
gr.Info("Now calling AudioLDM2 for SFX ...")
|
91 |
try:
|
92 |
client = Client("fffiloni/audioldm2-text2audio-text2music-API", hf_token=hf_token)
|
93 |
seed = random.randint(0, MAX_SEED)
|
|
|
119 |
raise gr.Error("AudioGen space API is not ready, please try again in few minutes ")
|
120 |
|
121 |
def get_tango(prompt):
|
122 |
+
gr.Info("Now calling AudioGen for SFX ...")
|
123 |
try:
|
124 |
client = Client("fffiloni/tango", hf_token=hf_token)
|
125 |
result = client.predict(
|
|
|
153 |
|
154 |
|
155 |
def get_stable_audio_open(prompt):
|
156 |
+
gr.Info("Now calling Stable-Audio for SFX ...")
|
157 |
try:
|
158 |
client = Client("fffiloni/Stable-Audio-Open-A10", hf_token=hf_token)
|
159 |
result = client.predict(
|