fffiloni commited on
Commit
48bc3bb
1 Parent(s): 7ee34c9

update Mustango api

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -31,7 +31,7 @@ def check_api(model_name):
31
  return "api not ready yet"
32
  elif model_name == "Mustango":
33
  try :
34
- client = Client("https://declare-lab-mustango.hf.space/")
35
  return "api ready"
36
  except :
37
  return "api not ready yet"
@@ -153,12 +153,12 @@ def get_riffusion(prompt):
153
  return result[1]
154
 
155
  def get_mustango(prompt):
156
- client = Client("https://declare-lab-mustango.hf.space/")
157
  result = client.predict(
158
- prompt, # str in 'Prompt' Textbox component
159
- 200, # float (numeric value between 100 and 200) in 'Steps' Slider component
160
- 6, # float (numeric value between 1 and 10) in 'Guidance Scale' Slider component
161
- api_name="/predict"
162
  )
163
  print(result)
164
  return result
 
31
  return "api not ready yet"
32
  elif model_name == "Mustango":
33
  try :
34
+ client = Client("fffiloni/mustango-API", hf_token=hf_token)
35
  return "api ready"
36
  except :
37
  return "api not ready yet"
 
153
  return result[1]
154
 
155
  def get_mustango(prompt):
156
+ client = Client("fffiloni/mustango-API", hf_token=hf_token)
157
  result = client.predict(
158
+ prompt=prompt, # str in 'Prompt' Textbox component
159
+ steps=200, # float (numeric value between 100 and 200) in 'Steps' Slider component
160
+ guidance=6, # float (numeric value between 1 and 10) in 'Guidance Scale' Slider component
161
+ api_name="/predict"
162
  )
163
  print(result)
164
  return result