github huggingface/huggingface_hub v0.34.6
[v0.34.6]: Welcoming PublicAI as Inference Providers!

latest releases: v0.35.0, v0.35.0.rc1
13 hours ago

Full Changelog: v0.34.5...v0.34.6

⚡ New provider: PublicAI

Tip

All supported PublicAI models can be found here.

Public AI Inference Utility is a nonprofit, open-source project building products and organizing advocacy to support the work of public AI model builders like the Swiss AI Initiative, AI Singapore, AI Sweden, and the Barcelona Supercomputing Center. Think of a BBC for AI, a public utility for AI, or public libraries for AI.

from huggingface_hub import InferenceClient

client = InferenceClient(provider="publicai")
completion = client.chat.completions.create(
    model="swiss-ai/Apertus-70B-Instruct-2509",
    messages=[{"role": "user", "content": "What is the capital of Switzerland?"}],
)

print(completion.choices[0].message.content)

Don't miss a new huggingface_hub release

NewReleases is sending notifications on new releases.