ehristoforu commited on
Commit
8133244
·
verified ·
1 Parent(s): ed219f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -9,7 +9,6 @@ from threading import Thread
9
 
10
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
11
  MODEL_ID = "ehristoforu/SoRu-0008"
12
- MODELS = os.environ.get("MODELS")
13
  MODEL_NAME = MODELS.split("/")[-1]
14
 
15
  TITLE = "<h1><center>Qwen2-7B-instruct</center></h1>"
@@ -37,11 +36,11 @@ text-align: center;
37
  """
38
 
39
  model = AutoModelForCausalLM.from_pretrained(
40
- MODELS,
41
  torch_dtype=torch.float16,
42
  device_map="auto",
43
  )
44
- tokenizer = Qwen2Tokenizer.from_pretrained(MODELS)
45
 
46
  @spaces.GPU
47
  def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
 
9
 
10
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
11
  MODEL_ID = "ehristoforu/SoRu-0008"
 
12
  MODEL_NAME = MODELS.split("/")[-1]
13
 
14
  TITLE = "<h1><center>Qwen2-7B-instruct</center></h1>"
 
36
  """
37
 
38
  model = AutoModelForCausalLM.from_pretrained(
39
+ MODEL_ID,
40
  torch_dtype=torch.float16,
41
  device_map="auto",
42
  )
43
+ tokenizer = Qwen2Tokenizer.from_pretrained(MODEL_ID)
44
 
45
  @spaces.GPU
46
  def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):