Rustamshry commited on
Commit
48e19d4
·
verified ·
1 Parent(s): 223064e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -4,17 +4,13 @@ from peft import PeftModel
4
  import torch
5
 
6
  # --- Load tokenizer and model for CPU ---
7
- tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-1.7B")
8
-
9
- base_model = AutoModelForCausalLM.from_pretrained(
10
- "unsloth/Qwen3-1.7B",
11
  dtype=torch.float32,
12
  device_map={"": "cpu"},
13
  )
14
 
15
- model = PeftModel.from_pretrained(base_model, "khazarai/BioGenesis-ToT").to("cpu")
16
-
17
-
18
  # --- Chatbot logic ---
19
  def generate_response(user_input, chat_history):
20
  if not user_input.strip():
 
4
  import torch
5
 
6
  # --- Load tokenizer and model for CPU ---
7
+ tokenizer = AutoTokenizer.from_pretrained("khazarai/BioGenesis-ToT")
8
+ model = AutoModelForCausalLM.from_pretrained(
9
+ "khazarai/BioGenesis-ToT",
 
10
  dtype=torch.float32,
11
  device_map={"": "cpu"},
12
  )
13
 
 
 
 
14
  # --- Chatbot logic ---
15
  def generate_response(user_input, chat_history):
16
  if not user_input.strip():