Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,9 @@ checkpoint = "CohereForAI/c4ai-command-r-v01"
|
|
| 20 |
checkpoint = "mistralai/Mistral-7B-Instruct-v0.1"
|
| 21 |
checkpoint = "google/gemma-1.1-7b-it"
|
| 22 |
checkpoint = "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO"
|
|
|
|
| 23 |
path_to_log = "FlaggedFalse.txt"
|
|
|
|
| 24 |
|
| 25 |
# Inference client with the model (And HF-token if needed)
|
| 26 |
client = InferenceClient(checkpoint)
|
|
@@ -67,6 +69,8 @@ def format_prompt_nous(message,chatbot,system_prompt=SYSTEM_PROMPT+SYSTEM_PROMPT
|
|
| 67 |
match checkpoint:
|
| 68 |
case "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO":
|
| 69 |
format_prompt=format_prompt_nous
|
|
|
|
|
|
|
| 70 |
|
| 71 |
def inference(message, history, temperature=0.9, maxTokens=512, topP=0.9, repPenalty=1.1):
|
| 72 |
# Updating the settings for the generation
|
|
|
|
| 20 |
checkpoint = "mistralai/Mistral-7B-Instruct-v0.1"
|
| 21 |
checkpoint = "google/gemma-1.1-7b-it"
|
| 22 |
checkpoint = "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO"
|
| 23 |
+
checkpoint = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
| 24 |
path_to_log = "FlaggedFalse.txt"
|
| 25 |
+
mistral_models=["mistralai/Mixtral-8x7B-Instruct-v0.1"]
|
| 26 |
|
| 27 |
# Inference client with the model (And HF-token if needed)
|
| 28 |
client = InferenceClient(checkpoint)
|
|
|
|
| 69 |
match checkpoint:
|
| 70 |
case "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO":
|
| 71 |
format_prompt=format_prompt_nous
|
| 72 |
+
case "mistralai/Mixtral-8x7B-Instruct-v0.1":
|
| 73 |
+
format_prompt=format_prompt_cohere
|
| 74 |
|
| 75 |
def inference(message, history, temperature=0.9, maxTokens=512, topP=0.9, repPenalty=1.1):
|
| 76 |
# Updating the settings for the generation
|