ciyidogan commited on
Commit
703f171
·
verified ·
1 Parent(s): d3cb3ec

Update llm_model.py

Browse files
Files changed (1) hide show
  1. llm_model.py +4 -3
llm_model.py CHANGED
@@ -3,14 +3,15 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, AutoModelForSequen
3
  from log import log
4
  from pydantic import BaseModel
5
 
 
 
 
 
6
  class Message(BaseModel):
7
  user_input: str
8
 
9
  def setup_model(s_config):
10
  global model, tokenizer, eos_token_id
11
- model = None
12
- tokenizer = None
13
- eos_token_id = None
14
  try:
15
  log("🧠 setup_model() başladı")
16
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
3
  from log import log
4
  from pydantic import BaseModel
5
 
6
+ model = None
7
+ tokenizer = None
8
+ eos_token_id = None
9
+
10
  class Message(BaseModel):
11
  user_input: str
12
 
13
  def setup_model(s_config):
14
  global model, tokenizer, eos_token_id
 
 
 
15
  try:
16
  log("🧠 setup_model() başladı")
17
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")