Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ if not torch.cuda.is_available():
|
|
22 |
if torch.cuda.is_available():
|
23 |
model_id = "CreitinGameplays/ConvAI-9b-v2"
|
24 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
|
25 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
26 |
tokenizer.use_default_system_prompt = False
|
27 |
|
28 |
system_prompt_text = "You are a helpful, respectful and honest AI assistant named ChatGPT. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don’t know the answer to a question, please don’t share false information."
|
|
|
22 |
if torch.cuda.is_available():
|
23 |
model_id = "CreitinGameplays/ConvAI-9b-v2"
|
24 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
|
25 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side='left')
|
26 |
tokenizer.use_default_system_prompt = False
|
27 |
|
28 |
system_prompt_text = "You are a helpful, respectful and honest AI assistant named ChatGPT. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don’t know the answer to a question, please don’t share false information."
|