Spaces:
Paused
Paused
Update app.py
Browse files
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 |
-
|
|
|
|
|
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)
|