Spaces:
Build error
Build error
Update app.py
Browse files115 unmodified lines116117118119120121119120121122123124125125126127128115 unmodified lines nutrition_prompt = f"Provide the nutrition information (Calories, Protein, Carbohydrates, Dietary Fiber, Sugars, Fat, Sodium, Potassium, Vitamin C, Vitamin B6, Folate, Niacin, Pantothenic acid) for {prediction} per 100 grams in a formatted list only." nutrition_info = call_llm(llm_client, nutrition_prompt) # Second prompt: Health benefits and tips health_benefits_prompt = f"Provide the health benefits and considerations for {prediction}. Additionally, include practical tips for making {prediction} healthier. Keep the response focused on these two aspects only." health_benefits_and_tips = call_llm(llm_client, health_benefits_prompt) # # Second prompt: Health benefits and tips # health_benefits_prompt = f"Provide the health benefits and considerations for {prediction}. Additionally, include practical tips for making {prediction} healthier. Keep the response focused on these two aspects only." # health_benefits_and_tips = call_llm(llm_client, health_benefits_prompt)
return { "predicted_label": prediction, "health_benefits_and_tips": health_benefits_and_tips, # "health_benefits_and_tips": health_benefits_and_tips, "nutrition_info": nutrition_info } except Exception as e:app.py+4-4