Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,15 @@ import random
|
|
| 4 |
import textwrap
|
| 5 |
|
| 6 |
# Define the model to be used
|
| 7 |
-
model = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
client = InferenceClient(model)
|
| 9 |
|
| 10 |
# Embedded system prompt
|
|
|
|
| 4 |
import textwrap
|
| 5 |
|
| 6 |
# Define the model to be used
|
| 7 |
+
#model = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
from peft import PeftModel, PeftConfig
|
| 11 |
+
from transformers import AutoModelForCausalLM
|
| 12 |
+
|
| 13 |
+
config = PeftConfig.from_pretrained("TachyHealthResearch/Mistral-7B-Medical-Finetune_V2")
|
| 14 |
+
base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
|
| 15 |
+
model = PeftModel.from_pretrained(base_model, "TachyHealthResearch/Mistral-7B-Medical-Finetune_V2")
|
| 16 |
client = InferenceClient(model)
|
| 17 |
|
| 18 |
# Embedded system prompt
|