Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -122,7 +122,11 @@ def get_audiogen(prompt):
|
|
122 |
return result
|
123 |
|
124 |
def get_tango(prompt):
|
125 |
-
|
|
|
|
|
|
|
|
|
126 |
result = client.predict(
|
127 |
prompt, # str representing string value in 'Prompt' Textbox component
|
128 |
100, # int | float representing numeric value between 100 and 200 in 'Steps' Slider component
|
|
|
122 |
return result
|
123 |
|
124 |
def get_tango(prompt):
|
125 |
+
try:
|
126 |
+
client = Client("https://declare-lab-tango.hf.space/")
|
127 |
+
except:
|
128 |
+
raise gr.Error("Tango space API is not ready, please try again in few minutes ")
|
129 |
+
|
130 |
result = client.predict(
|
131 |
prompt, # str representing string value in 'Prompt' Textbox component
|
132 |
100, # int | float representing numeric value between 100 and 200 in 'Steps' Slider component
|