Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,14 +6,14 @@ from peft import PeftModel, PeftConfig
|
|
6 |
#Note this should be used always in compliance with applicable laws and regulations if used with real patient data.
|
7 |
|
8 |
# Instantiate the Tokenizer
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
10 |
tokenizer.pad_token = tokenizer.eos_token
|
11 |
tokenizer.padding_side = 'left'
|
12 |
|
13 |
# Load the PEFT model
|
14 |
-
peft_config = PeftConfig.from_pretrained("
|
15 |
-
peft_model = MistralForCausalLM.from_pretrained("
|
16 |
-
peft_model = PeftModel.from_pretrained(peft_model, "
|
17 |
|
18 |
#Upload Patient Data
|
19 |
uploaded_file = st.file_uploader("Choose a CSV file", type="csv")
|
|
|
6 |
#Note this should be used always in compliance with applicable laws and regulations if used with real patient data.
|
7 |
|
8 |
# Instantiate the Tokenizer
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1", trust_remote_code=True, padding_side="left")
|
10 |
tokenizer.pad_token = tokenizer.eos_token
|
11 |
tokenizer.padding_side = 'left'
|
12 |
|
13 |
# Load the PEFT model
|
14 |
+
peft_config = PeftConfig.from_pretrained("pseudolab/K23_MiniMed")
|
15 |
+
peft_model = MistralForCausalLM.from_pretrained("pseudolab/K23_MiniMed", trust_remote_code=True)
|
16 |
+
peft_model = PeftModel.from_pretrained(peft_model, "pseudolab/K23_MiniMed")
|
17 |
|
18 |
#Upload Patient Data
|
19 |
uploaded_file = st.file_uploader("Choose a CSV file", type="csv")
|