Spaces:
Paused
Paused
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
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)
|
14 |
+
print(response)
|