Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
st.title("📖 AI-Powered Book Chatbot")
|
| 4 |
+
st.write("Ask any question about the book!")
|
| 5 |
+
|
| 6 |
+
question = st.text_input("Enter your question:")
|
| 7 |
+
|
| 8 |
+
if st.button("Ask"):
|
| 9 |
+
if question:
|
| 10 |
+
answer = ask_book(question)
|
| 11 |
+
st.write("### 🤖 Answer:")
|
| 12 |
+
st.write(answer)
|
| 13 |
+
else:
|
| 14 |
+
st.warning("Please enter a question.")
|