Skip to content

Commit 30b483c

Browse files
committed
Update Hugging Face API token handling in RAG deployment
1 parent 21c4dac commit 30b483c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llm-complete-guide/steps/rag_deployment.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,13 @@ def gradio_rag_deployment() -> None:
110110
Starts a web server with a chat interface that echoes back user messages.
111111
The server runs indefinitely until manually stopped.
112112
"""
113-
api = HfApi()
113+
api = HfApi(token=get_hf_token())
114114
api.create_repo(
115115
repo_id=hf_repo_id,
116116
repo_type="space",
117117
space_sdk="gradio",
118118
private=True,
119119
exist_ok=True,
120-
token=get_hf_token(),
121120
)
122121

123122
# Ensure values are strings

0 commit comments

Comments
 (0)