Skip to content

Commit 2e2401e

Browse files
committed
Merge branch 'hub-docs-on-inference-providers' of https://github.com/huggingface/hub-docs into hub-docs-on-inference-providers
2 parents ff74e98 + 391920e commit 2e2401e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/hub/models-inference.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Inference Providers
22

3-
Hugging Face's model pages have free inference for thousands of models, so you can try them all out right in the browser. It's also powered by Inference Providers.
3+
Hugging Face's model pages have pay-as-you-go inference for thousands of models, so you can try them all out right in the browser. Service is powered by Inference Providers and includes a free-tier.
44

55
Inference Providers give developers streamlined, unified access to hundreds of machine learning models, powered by the best serverless inference partners. 👉 **For complete documentation, visit the [Inference Providers Documentation](https://huggingface.co/docs/inference-providers)**.
66

77
## Inference Providers on the Hub
88

99
Inference Providers is deeply integrated with the Hugging Face Hub, and you can use it in a few different ways:
1010

11-
- **Interactive Widgets** - Test models directly on model pages with interactive widgets that use Inference Providers under the hood. Check out the [DeepSeek-R1-0528 model page](https://huggingface.co/models/deepseek-ai/DeepSeek-R1-0528) for an example.
11+
- **Interactive Widgets** - Test models directly on model pages with interactive widgets that use Inference Providers under the hood. Check out the [DeepSeek-R1-0528 model page](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528) for an example.
1212
- **Inference Playground** - Easily test and compare chat completion models with your prompts. Check out the [Inference Playground](https://huggingface.co/playground) to get started.
1313
- **Search** - Filter models by inference provider on the [models page](https://huggingface.co/models?inference_provider=all) to find models available through specific providers.
1414
- **Data Studio** - Use AI to explore datasets on the Hub. Check out [Data Studio](https://huggingface.co/datasets/fka/awesome-chatgpt-prompts/viewer?views%5B%5D=train) on your favorite dataset.
@@ -24,7 +24,12 @@ You can integrate Inference Providers into your own applications using our SDKs
2424
```python
2525
from huggingface_hub import InferenceClient
2626

27-
client = InferenceClient(provider="auto") # Automatically selects best provider
27+
import os
28+
29+
client = InferenceClient(
30+
api_key=os.environ["HF_TOKEN"],
31+
provider="auto", # Automatically selects best provider
32+
)
2833

2934
# Chat completion
3035
completion = client.chat.completions.create(

0 commit comments

Comments
 (0)