oiisa commited on
Commit
8dd0c9b
·
verified ·
1 Parent(s): 45499c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,15 +5,15 @@ import torch
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, load_in_4bit=True)
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