raguv commited on
Commit
1d7ca7e
·
verified ·
1 Parent(s): 8959305

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
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
- login(token=access_token)
78
- user_info = whoami(token=access_token)
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)