Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,14 +8,14 @@ from datetime import datetime
|
|
| 8 |
|
| 9 |
# Model which is used
|
| 10 |
checkpoint = "CohereForAI/c4ai-command-r-v01"
|
| 11 |
-
checkpoint = "mistralai/Mistral-7B-Instruct-v0.
|
| 12 |
-
checkpoint = "google/flan-t5-small"
|
| 13 |
path_to_log = "FlaggedFalse.txt"
|
| 14 |
|
| 15 |
# Inference client with the model (And HF-token if needed)
|
| 16 |
client = InferenceClient(checkpoint)
|
| 17 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
| 18 |
-
if checkpoint == "mistralai/Mistral-7B-Instruct-v0.
|
| 19 |
# Tokenizer chat template correction(Only works for mistral models)
|
| 20 |
chat_template = open("mistral-instruct.jinja").read()
|
| 21 |
chat_template = chat_template.replace(' ', '').replace('\n', '')
|
|
|
|
| 8 |
|
| 9 |
# Model which is used
|
| 10 |
checkpoint = "CohereForAI/c4ai-command-r-v01"
|
| 11 |
+
checkpoint = "mistralai/Mistral-7B-Instruct-v0.1"
|
| 12 |
+
#checkpoint = "google/flan-t5-small"
|
| 13 |
path_to_log = "FlaggedFalse.txt"
|
| 14 |
|
| 15 |
# Inference client with the model (And HF-token if needed)
|
| 16 |
client = InferenceClient(checkpoint)
|
| 17 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
| 18 |
+
if checkpoint == "mistralai/Mistral-7B-Instruct-v0.1":
|
| 19 |
# Tokenizer chat template correction(Only works for mistral models)
|
| 20 |
chat_template = open("mistral-instruct.jinja").read()
|
| 21 |
chat_template = chat_template.replace(' ', '').replace('\n', '')
|