Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -2,12 +2,7 @@ import getpass
|
|
2 |
import os
|
3 |
#os.environ["MISTRAL_API_KEY"] = getpass.getpass()
|
4 |
#os.environ["HF_TOKEN"] = getpass.getpass()
|
5 |
-
api_key = os.getenv()
|
6 |
-
|
7 |
-
from mistralai import Mistral
|
8 |
-
api_key = os.environ["MISTRAL_API_KEY"]
|
9 |
-
#model = "open-mixtral-8x22b" #"pixtral-12b-2409"#"Mathstral" #"mistral-large-latest"
|
10 |
-
#client = Mistral(api_key='kK3vwEJn7YIPJeYg4Zvjz8S2i7v6Gb5H')
|
11 |
client = HuggingFaceHub(repo_id = 'mistralai/Mathstral-7B-v0.1') # 'mistralai/Mathstral-7B-v0.1')
|
12 |
prompt = "What is the best French cheese?"
|
13 |
response = client(prompt)
|
|
|
2 |
import os
|
3 |
#os.environ["MISTRAL_API_KEY"] = getpass.getpass()
|
4 |
#os.environ["HF_TOKEN"] = getpass.getpass()
|
5 |
+
api_key = os.getenv("HF_TOKEN")
|
|
|
|
|
|
|
|
|
|
|
6 |
client = HuggingFaceHub(repo_id = 'mistralai/Mathstral-7B-v0.1') # 'mistralai/Mathstral-7B-v0.1')
|
7 |
prompt = "What is the best French cheese?"
|
8 |
response = client(prompt)
|