anzorq commited on
Commit
fbf881f
β€’
1 Parent(s): 0bcfb9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -42,8 +42,9 @@ 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), gr.update(choices=model_names, label="Select a model:"), error_str(error)
 
47
 
48
  def on_load_model(user_model_id, other_model_id, token):
49
 
 
42
 
43
  if token:
44
  model_names, error = get_my_model_names(token)
45
+ return gr.update(visible=not error), gr.update(choices=model_names, label="Select a model:"), error_str(error)
46
+ else:
47
+ return gr.update(visible=False), gr.update(choices=[], label="Select a model:"), None
48
 
49
  def on_load_model(user_model_id, other_model_id, token):
50