File size: 232 Bytes
6df1c09
 
 
 
 
 
1
2
3
4
5
6
7
from huggingface_hub import InferenceClient
import os

client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3", token=os.getenv("HF_TOKEN"))
res = client.text_generation("Hello, this is a test.", max_new_tokens=20)
print(res)