mrbui1990 commited on
Commit
9ca1c61
·
verified ·
1 Parent(s): 21f02dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -8
app.py CHANGED
@@ -15,14 +15,6 @@ model = AutoModelForCausalLM.from_pretrained(
15
 
16
  @spaces.GPU(duration=60) # cấp GPU tạm cho 1 phút
17
  def chat_with_model(prompt):
18
- tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
19
- model = AutoModelForCausalLM.from_pretrained(
20
- MODEL_ID,
21
- torch_dtype=torch.float16,
22
- device_map="auto",
23
- trust_remote_code=True
24
- )
25
-
26
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
27
  output = model.generate(
28
  **inputs,
 
15
 
16
  @spaces.GPU(duration=60) # cấp GPU tạm cho 1 phút
17
  def chat_with_model(prompt):
 
 
 
 
 
 
 
 
18
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
19
  output = model.generate(
20
  **inputs,