Spaces:
Paused
Paused
Commit
•
1c3c739
1
Parent(s):
38cf703
Update app.py
Browse files
app.py
CHANGED
@@ -57,6 +57,12 @@ model = PeftModel.from_pretrained(model, "physician-ai/mistral-finetuned1",use_a
|
|
57 |
tokenizer = AutoTokenizer.from_pretrained("physician-ai/mistral-finetuned1",use_auth_token=access_token)
|
58 |
text_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=1024, temperature=0.8, top_p=0.95, repetition_penalty=1.15)
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
@spaces.GPU(duration=120)
|
61 |
def chat_llama3_8b(message: str,
|
62 |
history: list,
|
|
|
57 |
tokenizer = AutoTokenizer.from_pretrained("physician-ai/mistral-finetuned1",use_auth_token=access_token)
|
58 |
text_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=1024, temperature=0.8, top_p=0.95, repetition_penalty=1.15)
|
59 |
|
60 |
+
terminators = [
|
61 |
+
tokenizer.eos_token_id,
|
62 |
+
tokenizer.convert_tokens_to_ids("<|eot_id|>")
|
63 |
+
]
|
64 |
+
|
65 |
+
|
66 |
@spaces.GPU(duration=120)
|
67 |
def chat_llama3_8b(message: str,
|
68 |
history: list,
|