fudii0921 commited on
Commit
a39227b
·
verified ·
1 Parent(s): c14f140

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -20,11 +20,12 @@ def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthTo
20
  gr.Textbox(oauth_token)
21
  if oauth_token is None:
22
  return "Please log in to list private models."
23
- models = [
24
- f"{model.id} ({'private' if model.private else 'public'})"
25
- for model in list_models(author=profile.username, token=oauth_token.token)
26
- ]
27
- return "Models:\n\n" + "\n - ".join(models) + ".", gr.update(visible=True)
 
28
 
29
 
30
  with gr.Blocks() as demo:
 
20
  gr.Textbox(oauth_token)
21
  if oauth_token is None:
22
  return "Please log in to list private models."
23
+ #models = [
24
+ #f"{model.id} ({'private' if model.private else 'public'})"
25
+ #for model in list_models(author=profile.username, token=oauth_token.token)
26
+ #]
27
+ #return "Models:\n\n" + "\n - ".join(models) + ".", gr.update(visible=True)
28
+ return oauth_token, gr.update(visible=True)
29
 
30
 
31
  with gr.Blocks() as demo: