tuan243 commited on
Commit
a6bed9b
·
verified ·
1 Parent(s): ae13880

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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="mistralai/Mistral-7B-Instruct-v0.1")
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=300)
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ủ