Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ from datetime import datetime
|
|
| 8 |
|
| 9 |
# Model which is used
|
| 10 |
checkpoint = "CohereForAI/c4ai-command-r-v01"
|
| 11 |
-
|
| 12 |
path_to_log = "log.txt"
|
| 13 |
# Inference client with the model (And HF-token if needed)
|
| 14 |
client = InferenceClient(checkpoint)
|
|
@@ -29,7 +29,6 @@ def format_prompt(message, chatbot, system_prompt):
|
|
| 29 |
messages.append({"role": "user", "content": message})
|
| 30 |
newPrompt = tokenizer.apply_chat_template(
|
| 31 |
messages, tokenize=False, add_generation_prompt=True, return_tensors="pt")
|
| 32 |
-
# newPrompt = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
|
| 33 |
return newPrompt
|
| 34 |
|
| 35 |
|
|
|
|
| 8 |
|
| 9 |
# Model which is used
|
| 10 |
checkpoint = "CohereForAI/c4ai-command-r-v01"
|
| 11 |
+
checkpoint = "mistral-community/Mixtral-8x22B-v0.1"
|
| 12 |
path_to_log = "log.txt"
|
| 13 |
# Inference client with the model (And HF-token if needed)
|
| 14 |
client = InferenceClient(checkpoint)
|
|
|
|
| 29 |
messages.append({"role": "user", "content": message})
|
| 30 |
newPrompt = tokenizer.apply_chat_template(
|
| 31 |
messages, tokenize=False, add_generation_prompt=True, return_tensors="pt")
|
|
|
|
| 32 |
return newPrompt
|
| 33 |
|
| 34 |
|