nguyen1207
commited on
Commit
•
0a745c3
1
Parent(s):
9141fcd
fix model type
Browse files
app.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
from peft import PeftModel
|
4 |
-
from transformers import
|
5 |
|
6 |
model_name = 'intfloat/multilingual-e5-large'
|
7 |
adapters_name = './checkpoint-21170'
|
8 |
|
9 |
|
10 |
-
model =
|
11 |
model = PeftModel.from_pretrained(model, adapters_name)
|
12 |
model = model.merge_and_unload()
|
13 |
|
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
from peft import PeftModel
|
4 |
+
from transformers import AutoModel, AutoTokenizer
|
5 |
|
6 |
model_name = 'intfloat/multilingual-e5-large'
|
7 |
adapters_name = './checkpoint-21170'
|
8 |
|
9 |
|
10 |
+
model = AutoModel.from_pretrained(model_name)
|
11 |
model = PeftModel.from_pretrained(model, adapters_name)
|
12 |
model = model.merge_and_unload()
|
13 |
|