Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,16 +10,7 @@ def hello(profile: gr.OAuthProfile | None) -> str:
|
|
10 |
return f"Hello {profile.name}"
|
11 |
|
12 |
|
13 |
-
|
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:
|