Spaces:
Sleeping
Sleeping
Update ai_model.py
Browse files- ai_model.py +7 -1
ai_model.py
CHANGED
|
@@ -30,7 +30,13 @@ def generate_daily_checklist(role, project_id, milestones, reflection):
|
|
| 30 |
)
|
| 31 |
prompt += f"Milestones: {milestones}\nChecklist and Tips:\n"
|
| 32 |
|
| 33 |
-
output = generator(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
# Parse output based on keywords "Checklist:" and "Tips:"
|
| 36 |
checklist = ""
|
|
|
|
| 30 |
)
|
| 31 |
prompt += f"Milestones: {milestones}\nChecklist and Tips:\n"
|
| 32 |
|
| 33 |
+
output = generator(
|
| 34 |
+
prompt,
|
| 35 |
+
max_new_tokens=100, # generate up to 100 tokens after prompt
|
| 36 |
+
num_return_sequences=1,
|
| 37 |
+
truncation=True # explicitly truncate prompt if too long
|
| 38 |
+
)[0]['generated_text']
|
| 39 |
+
|
| 40 |
|
| 41 |
# Parse output based on keywords "Checklist:" and "Tips:"
|
| 42 |
checklist = ""
|