We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 111aec5 commit bef1e90Copy full SHA for bef1e90
docs/hub/models-inference.md
@@ -23,7 +23,12 @@ You can integrate Inference Providers into your own applications using our SDKs
23
```python
24
from huggingface_hub import InferenceClient
25
26
-client = InferenceClient(provider="auto") # Automatically selects best provider
+import os
27
+
28
+client = InferenceClient(
29
+ api_key=os.environ["HF_TOKEN"],
30
+ provider="auto", # Automatically selects best provider
31
+)
32
33
# Chat completion
34
completion = client.chat.completions.create(
0 commit comments