Spaces:
Sleeping
Sleeping
Update main.py
Browse files
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("/")
|