We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b400706 commit c38cf64Copy full SHA for c38cf64
.changeset/itchy-facts-retire.md
@@ -0,0 +1,5 @@
1
+---
2
+"gradio": minor
3
4
+
5
+feat:Use get_token instead of HfFolder.get_token
gradio/oauth.py
@@ -10,7 +10,7 @@
10
11
import fastapi
12
from fastapi.responses import RedirectResponse
13
-from huggingface_hub import HfFolder, whoami
+from huggingface_hub import get_token, whoami
14
from starlette.datastructures import URL
15
16
from gradio.utils import get_space
@@ -298,7 +298,7 @@ def list_organizations(oauth_token: Optional[gr.OAuthToken]) -> str:
298
299
300
def _get_mocked_oauth_info() -> typing.Dict:
301
- token = HfFolder.get_token()
+ token = get_token()
302
if token is None:
303
raise ValueError(
304
"Your machine must be logged in to HF to debug a Gradio app locally. Please"
0 commit comments