Final_Assignment_Template / testing_pipeline.py
Synnove's picture
Update testing_pipeline.py
f517477 verified
raw
history blame contribute delete
390 Bytes
import os
from huggingface_hub import InferenceClient
client = InferenceClient(
provider="hf-inference",
api_key=os.environ["HF_TOKEN"],
)
completion = client.chat.completions.create(
model="sarvamai/sarvam-m",
messages=[
{
"role": "user",
"content": "What is the capital of France?"
}
],
)
print(completion.choices[0].message)