Spaces:
Sleeping
Sleeping
Download app.py from scorpio84/pharma_analytics: direct link, hf CLI and curl.
- Browser
- Download file 452 Bytes
-
https://huggingface.co/spaces/scorpio84/pharma_analytics/resolve/main/app.py
- Command line
-
hf download hf://spaces/scorpio84/pharma_analytics/app.py
-
curl -L -o app.py https://huggingface.co/spaces/scorpio84/pharma_analytics/resolve/main/app.py
452 Bytes
| 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.") | |