File size: 1,099 Bytes
b89a86d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

######################## 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.")