tuan243 commited on
Commit
585d16c
·
verified ·
1 Parent(s): 3946ae0

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -85,7 +85,7 @@ async def ai_personal_advice(request: AIRequest):
85
  input_ids = tokenizer(prompt, return_tensors="pt")
86
  response = ai_model.generate(**input_ids, max_new_tokens=500)
87
  # response = ai_model(prompt, max_length=200)
88
- return {"advice": tokenizer.decode(response[0])}
89
 
90
  # Trang chủ
91
  @app.get("/")
 
85
  input_ids = tokenizer(prompt, return_tensors="pt")
86
  response = ai_model.generate(**input_ids, max_new_tokens=500)
87
  # response = ai_model(prompt, max_length=200)
88
+ return {"advice": tokenizer.decode(response[0], skip_special_tokens=True)}
89
 
90
  # Trang chủ
91
  @app.get("/")