Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -83,13 +83,16 @@ def generate_diet_plan(dish_name, calorie_intake_per_day, goal):
|
|
83 |
Input:
|
84 |
- Dish Name: {dish_name}
|
85 |
- Caloric Intake per Day: {calorie_intake_per_day} calories
|
86 |
-
- Goal: {goal}
|
87 |
|
|
|
|
|
|
|
88 |
"""
|
89 |
response = client1.chat_completion(
|
90 |
model="meta-llama/Meta-Llama-3-8B-Instruct",
|
91 |
messages=[{"role": "You are a certified Dietitian with 20 years of Experience", "content": user_input}],
|
92 |
-
max_tokens=
|
93 |
)
|
94 |
|
95 |
return response.choices[0].message.content
|
|
|
83 |
Input:
|
84 |
- Dish Name: {dish_name}
|
85 |
- Caloric Intake per Day: {calorie_intake_per_day} calories
|
86 |
+
- Goal: {goal} (e.g., weight loss, weight gain)
|
87 |
|
88 |
+
Provide the response in the following format:
|
89 |
+
1. Dish assessment (e.g., "The dish {dish_name} is suitable for your goal" or "The dish {dish_name} is not suitable for your goal, as it is too high in calories for weight goal").
|
90 |
+
2. Suggest an Indian diet plan that stays near to the {calorie_intake_per_day}. For each meal (morning, lunch, evening), list the dish name, calorie count, and ingredients required to make it.And Make it with in 700 Tokens.
|
91 |
"""
|
92 |
response = client1.chat_completion(
|
93 |
model="meta-llama/Meta-Llama-3-8B-Instruct",
|
94 |
messages=[{"role": "You are a certified Dietitian with 20 years of Experience", "content": user_input}],
|
95 |
+
max_tokens=700
|
96 |
)
|
97 |
|
98 |
return response.choices[0].message.content
|