JaphetHernandez commited on
Commit
974dbb9
·
verified ·
1 Parent(s): 49d62e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,7 +3,9 @@ import os
3
  from langchain import HuggingFaceHub
4
  #os.environ["MISTRAL_API_KEY"] = getpass.getpass()
5
  #os.environ["HF_TOKEN"] = getpass.getpass()
6
- api_key = os.getenv("HF_TOKEN")
 
 
7
  client = HuggingFaceHub(repo_id = 'mistralai/Mathstral-7B-v0.1') # 'mistralai/Mathstral-7B-v0.1')
8
  prompt = "What is the best French cheese?"
9
  response = client(prompt)
 
3
  from langchain import HuggingFaceHub
4
  #os.environ["MISTRAL_API_KEY"] = getpass.getpass()
5
  #os.environ["HF_TOKEN"] = getpass.getpass()
6
+ from huggingface_hub import login
7
+ login(token='HF_TOKEN')
8
+ #api_key = os.getenv("HF_TOKEN")
9
  client = HuggingFaceHub(repo_id = 'mistralai/Mathstral-7B-v0.1') # 'mistralai/Mathstral-7B-v0.1')
10
  prompt = "What is the best French cheese?"
11
  response = client(prompt)