File size: 432 Bytes
790ed47
 
49d62e1
790ed47
 
974dbb9
 
 
4851603
 
 
 
f73e858
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import getpass
import os
from langchain import HuggingFaceHub
#os.environ["MISTRAL_API_KEY"] = getpass.getpass()
#os.environ["HF_TOKEN"] = getpass.getpass()
from huggingface_hub import login
login(token='HF_TOKEN')
#api_key = os.getenv("HF_TOKEN")
client = HuggingFaceHub(repo_id = 'mistralai/Mathstral-7B-v0.1') # 'mistralai/Mathstral-7B-v0.1')
prompt = "What is the best French cheese?"
response = client(prompt)
print(response)