Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,15 @@
|
|
1 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
|
|
|
2 |
import gradio as gr
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
# Use the base model's ID
|
5 |
base_model_id = "mistralai/Mistral-7B-v0.1"
|
6 |
model_directory = "Tonic/mistralmed"
|
|
|
1 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
2 |
+
from peft import PeftModel, PeftConfig
|
3 |
+
from transformers import AutoModelForCausalLM
|
4 |
+
|
5 |
import gradio as gr
|
6 |
|
7 |
+
|
8 |
+
|
9 |
+
config = PeftConfig.from_pretrained("Tonic/mistralmed")
|
10 |
+
model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1")
|
11 |
+
model = PeftModel.from_pretrained(model, "Tonic/mistralmed")
|
12 |
+
|
13 |
# Use the base model's ID
|
14 |
base_model_id = "mistralai/Mistral-7B-v0.1"
|
15 |
model_directory = "Tonic/mistralmed"
|