Spaces:
Build error
Build error
Change the model for real to Mistral this time
Browse files
app.py
CHANGED
|
@@ -12,14 +12,17 @@ For more information on huggingface_hub Inference API support, please check the
|
|
| 12 |
# Vérifie si la clé API est définie dans l'environnement (pour local)
|
| 13 |
api_token = os.getenv("HF_API_TOKEN")
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
if api_token:
|
| 16 |
# Local : Utilise la clé API
|
| 17 |
print("Local key found in .env")
|
| 18 |
-
client = InferenceClient(token=api_token, model=
|
| 19 |
else:
|
| 20 |
# Sur Hugging Face Spaces : Pas besoin de clé
|
| 21 |
print("We are on HF, no need API key")
|
| 22 |
-
client = InferenceClient(model=
|
| 23 |
|
| 24 |
|
| 25 |
def respond(
|
|
|
|
| 12 |
# Vérifie si la clé API est définie dans l'environnement (pour local)
|
| 13 |
api_token = os.getenv("HF_API_TOKEN")
|
| 14 |
|
| 15 |
+
model_id = "mistralai/Mistral-7B-Instruct-v0.3"
|
| 16 |
+
#model_id = "HuggingFaceH4/zephyr-7b-beta"
|
| 17 |
+
|
| 18 |
if api_token:
|
| 19 |
# Local : Utilise la clé API
|
| 20 |
print("Local key found in .env")
|
| 21 |
+
client = InferenceClient(token=api_token, model=model_id)
|
| 22 |
else:
|
| 23 |
# Sur Hugging Face Spaces : Pas besoin de clé
|
| 24 |
print("We are on HF, no need API key")
|
| 25 |
+
client = InferenceClient(model=model_id)
|
| 26 |
|
| 27 |
|
| 28 |
def respond(
|