fffiloni commited on
Commit
36206e3
1 Parent(s): adcf5f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -122,7 +122,11 @@ def get_audiogen(prompt):
122
  return result
123
 
124
  def get_tango(prompt):
125
- client = Client("https://declare-lab-tango.hf.space/")
 
 
 
 
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