Ctaake commited on
Commit
3c35121
·
verified ·
1 Parent(s): 498e15f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.2"
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.2":
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', '')