Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -76,8 +76,8 @@ newmodel = PeftModel.from_pretrained(peft_model_id, use_auth_token="hf_sPXSxqIkW
|
|
76 |
newtokenizer = AutoTokenizer.from_pretrained(peft_model_id, use_auth_token="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")
|
77 |
|
78 |
def givetext(input_text, lmodel, ltokenizer):
|
79 |
-
eval_prompt_pt1 =
|
80 |
-
eval_prompt_pt2 = "
|
81 |
eval_prompt = eval_prompt_pt1 + input_text + eval_prompt_pt2
|
82 |
print(eval_prompt, "\n\n")
|
83 |
model_input = ltokenizer(eval_prompt, return_tensors="pt").to("cuda")
|
|
|
76 |
newtokenizer = AutoTokenizer.from_pretrained(peft_model_id, use_auth_token="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")
|
77 |
|
78 |
def givetext(input_text, lmodel, ltokenizer):
|
79 |
+
eval_prompt_pt1 = \nBelow is an instruction that describes a task. Write a response that appropriately completes the request.\n### Instruction: Act like a therapist and respond\n\n### Input: "
|
80 |
+
eval_prompt_pt2 = "\n\n\n### Response:\n"
|
81 |
eval_prompt = eval_prompt_pt1 + input_text + eval_prompt_pt2
|
82 |
print(eval_prompt, "\n\n")
|
83 |
model_input = ltokenizer(eval_prompt, return_tensors="pt").to("cuda")
|