Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +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 |
# Load the PEFT model
|
13 |
-
peft_config = PeftConfig.from_pretrained("
|
14 |
-
peft_model = MistralForCausalLM.from_pretrained("
|
15 |
-
peft_model = PeftModel.from_pretrained(peft_model, "
|
16 |
|
17 |
#Upload Patient Data
|
18 |
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("squarelike/llama2-ko-medical-7b", 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("squarelike/llama2-ko-medical-7b")
|
15 |
+
peft_model = MistralForCausalLM.from_pretrained("squarelike/llama2-ko-medical-7b", trust_remote_code=True)
|
16 |
+
peft_model = PeftModel.from_pretrained(peft_model, "squarelike/llama2-ko-medical-7b")
|
17 |
|
18 |
#Upload Patient Data
|
19 |
uploaded_file = st.file_uploader("Choose a CSV file", type="csv")
|