Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,12 +9,14 @@ def hello(profile: gr.OAuthProfile | None) -> str:
|
|
9 |
return "I don't know you."
|
10 |
return f"Hello {profile.name}"
|
11 |
|
12 |
-
def message(message,history,profile: gr.OAuthProfile | None,oauth_token: gr.OAuthToken | None):
|
|
|
13 |
if profile is None:
|
14 |
raise gr.Error('Click "Sign in with Hugging Face" to continue')
|
15 |
else:
|
16 |
print(profile)
|
17 |
print(f'oauth token: {oauth_token.token}')
|
|
|
18 |
return f"hello {profile.name}"
|
19 |
|
20 |
def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToken | None) -> str:
|
|
|
9 |
return "I don't know you."
|
10 |
return f"Hello {profile.name}"
|
11 |
|
12 |
+
def message(message,history,profile: gr.OAuthProfile | None,oauth_token: gr.OAuthToken | None, request: gr.Request):
|
13 |
+
print(request.client.host)
|
14 |
if profile is None:
|
15 |
raise gr.Error('Click "Sign in with Hugging Face" to continue')
|
16 |
else:
|
17 |
print(profile)
|
18 |
print(f'oauth token: {oauth_token.token}')
|
19 |
+
|
20 |
return f"hello {profile.name}"
|
21 |
|
22 |
def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToken | None) -> str:
|