lunarflu HF Staff commited on
Commit
5dd8b6d
·
verified ·
1 Parent(s): 3a7bf1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -10,16 +10,7 @@ def hello(profile: gr.OAuthProfile | None) -> str:
10
  return f"Hello {profile.name}"
11
 
12
 
13
- def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToken | None) -> str:
14
- # ^ expect a gr.OAuthToken object as input to get the user's token
15
- # if the user is not logged in, oauth_token will be None
16
- if oauth_token is None:
17
- return "Please log in to list private models."
18
- models = [
19
- f"{model.id} ({'private' if model.private else 'public'})"
20
- for model in list_models(author=profile.username, token=oauth_token.token)
21
- ]
22
- return "Models:\n\n" + "\n - ".join(models) + "."
23
 
24
 
25
  with gr.Blocks() as demo:
 
10
  return f"Hello {profile.name}"
11
 
12
 
13
+
 
 
 
 
 
 
 
 
 
14
 
15
 
16
  with gr.Blocks() as demo: