Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -18,7 +18,7 @@ if HF_TOKEN:
|
|
18 |
login(HF_TOKEN)
|
19 |
|
20 |
# Load AI Model
|
21 |
-
ai_model = pipeline("text-generation", model="
|
22 |
|
23 |
app = FastAPI()
|
24 |
|
@@ -81,7 +81,7 @@ async def ai_personal_advice(request: AIRequest):
|
|
81 |
Hãy tư vấn cách cải thiện hiệu suất làm việc dựa trên thông tin trên.
|
82 |
"""
|
83 |
|
84 |
-
response = ai_model(prompt, max_length=
|
85 |
return {"advice": response[0]["generated_text"]}
|
86 |
|
87 |
# Trang chủ
|
|
|
18 |
login(HF_TOKEN)
|
19 |
|
20 |
# Load AI Model
|
21 |
+
ai_model = pipeline("text-generation", model="google/flan-t5-base")
|
22 |
|
23 |
app = FastAPI()
|
24 |
|
|
|
81 |
Hãy tư vấn cách cải thiện hiệu suất làm việc dựa trên thông tin trên.
|
82 |
"""
|
83 |
|
84 |
+
response = ai_model(prompt, max_length=200)
|
85 |
return {"advice": response[0]["generated_text"]}
|
86 |
|
87 |
# Trang chủ
|