Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,15 +5,15 @@ import torch
|
|
5 |
st.set_page_config(page_title="ИТМО Магистратура Чат-бот", page_icon="🎓")
|
6 |
st.title("🎓 Чат-бот про магистратуру ИТМО")
|
7 |
|
8 |
-
|
9 |
-
MODEL_NAME = "Qwen/Qwen2.5-3B-Instruct"
|
10 |
|
11 |
|
12 |
|
13 |
@st.cache_resource
|
14 |
def load_model():
|
15 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
16 |
-
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME
|
17 |
if torch.cuda.is_available():
|
18 |
model = model.to('cuda')
|
19 |
return tokenizer, model
|
|
|
5 |
st.set_page_config(page_title="ИТМО Магистратура Чат-бот", page_icon="🎓")
|
6 |
st.title("🎓 Чат-бот про магистратуру ИТМО")
|
7 |
|
8 |
+
MODEL_NAME = "sberbank-ai/rugpt3small_based_on_gpt2"
|
9 |
+
# MODEL_NAME = "Qwen/Qwen2.5-3B-Instruct"
|
10 |
|
11 |
|
12 |
|
13 |
@st.cache_resource
|
14 |
def load_model():
|
15 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
|
16 |
+
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
|
17 |
if torch.cuda.is_available():
|
18 |
model = model.to('cuda')
|
19 |
return tokenizer, model
|