File size: 452 Bytes
a8fda3a
87d5751
a8fda3a
 
 
 
 
 
 
 
87d5751
a8fda3a
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import streamlit as st
from query_model import ask_book  # βœ… Ensure this import is correct

st.title("πŸ“– AI-Powered Book Chatbot")
st.write("Ask any question about the book!")

question = st.text_input("Enter your question:")

if st.button("Ask"):
    if question:
        answer = ask_book(question)  # βœ… This should now work
        st.write("### πŸ€– Answer:")
        st.write(answer)
    else:
        st.warning("Please enter a question.")