######################## WRITE YOUR CODE HERE ######################### | |
import streamlit as st | |
#import agentic_rag | |
st.set_page_config(page_title="Nutribot - Your Nutrition Assistant", layout="centered") | |
st.title("Nutribot") | |
st.subheader("Personalized, intelligent nutrition guidance") | |
st.markdown(""" | |
Ask me anything related to nutrition, diet, or healthy eating! | |
Examples: | |
- *What is a good high-protein vegetarian lunch under 400 calories?* | |
- *Suggest a low-carb dinner that’s rich in fiber.* | |
""") | |
query = st.text_area("Enter your question", height=100, placeholder="e.g., Suggest meals for iron deficiency") | |
if st.button("Ask Nutribot") and query.strip(): | |
with st.spinner("Thinking..."): | |
#result = agentic_rag.invoke(query) | |
result = nutrition_disorder_agent() #review this and the line of code above it before finalizing the program | |
st.success("Here’s what I found:") | |
st.markdown(f"**Response:** {result.get('response', 'Sorry, I couldn’t generate a response.')}") | |
elif query.strip() == "": | |
st.info("Please enter a question to get started.") | |