Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,10 +72,15 @@ else:
|
|
| 72 |
# "https://huggingface.co/api/whoami-v2",
|
| 73 |
# headers={"Authorization": f"Bearer {access_token}"}
|
| 74 |
#).json()
|
|
|
|
|
|
|
| 75 |
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
|
| 78 |
-
user_info = whoami(
|
| 79 |
|
| 80 |
st.subheader("👤 Logged in as:")
|
| 81 |
st.json(user_info)
|
|
|
|
| 72 |
# "https://huggingface.co/api/whoami-v2",
|
| 73 |
# headers={"Authorization": f"Bearer {access_token}"}
|
| 74 |
#).json()
|
| 75 |
+
|
| 76 |
+
|
| 77 |
|
| 78 |
+
# confusion, as access_token returned above is a Org token and not Personal token!!
|
| 79 |
+
#login(token=access_token)
|
| 80 |
+
#user_info = whoami(token=access_token)
|
| 81 |
|
| 82 |
+
#lets try calling without access-token
|
| 83 |
+
user_info = requests.get("https://huggingface.co/api/whoami-v2").json()
|
| 84 |
|
| 85 |
st.subheader("👤 Logged in as:")
|
| 86 |
st.json(user_info)
|