anzorq commited on
Commit
1e49bf0
1 Parent(s): f5d967f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -39,10 +39,11 @@ def get_my_model_names(token):
39
  return [], e
40
 
41
  def on_token_change(token):
 
42
  if token:
43
  model_names, error = get_my_model_names(token)
44
 
45
- return gr.update(visible=not error, choices=model_names, label="Select a model:"), error_str(error)
46
 
47
  def on_load_model(user_model_id, other_model_id, token):
48
 
@@ -166,7 +167,7 @@ with gr.Blocks() as demo:
166
  input_token.change(
167
  fn=on_token_change,
168
  inputs=input_token,
169
- outputs=[group_model, radio_model_names, error_output],
170
  queue=False,
171
  scroll_to_output=True)
172
 
@@ -194,8 +195,5 @@ with gr.Blocks() as demo:
194
  </div>
195
  """)
196
 
197
- # demo.queue()
198
- demo.launch(debug=True)
199
-
200
- # Tweet presenting this space:
201
- # Made a space which lets you easily create a gradio demo for your Diffusers🧨 model and share it with the community in just a few clicks! 🚀
 
39
  return [], e
40
 
41
  def on_token_change(token):
42
+
43
  if token:
44
  model_names, error = get_my_model_names(token)
45
 
46
+ return gr.update(visible=not error, choices=model_names, label="Select a model:"), error_str(error)
47
 
48
  def on_load_model(user_model_id, other_model_id, token):
49
 
 
167
  input_token.change(
168
  fn=on_token_change,
169
  inputs=input_token,
170
+ outputs=[group_model, error_output],
171
  queue=False,
172
  scroll_to_output=True)
173
 
 
195
  </div>
196
  """)
197
 
198
+ demo.queue()
199
+ demo.launch(debug=True)