Spaces:
Build error
Build error
Update app.py
Browse files116 unmodified lines117118119120121122123124125126127128129116 unmodified linesnutrition_info = call_llm(llm_client, nutrition_prompt)# Second prompt: Health benefits and tipshealth_benefits_prompt = f"Provide the health benefits and considerations for {prediction} and give tips for making it healthier."health_benefits_and_tips = call_llm(llm_client, health_benefits_prompt)return {"predicted_label": prediction,"nutrition_info": nutrition_info,"health_benefits_and_tips": health_benefits_and_tips}except Exception as e:return JSONResponse(116 unmodified lines117118119120121122123124125126127128129116 unmodified linesnutrition_info = call_llm(llm_client, nutrition_prompt)# Second prompt: Health benefits and tipshealth_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,"nutrition_info": nutrition_info}except Exception as e:return JSONResponse(
app.py+3-3