Streamlit is an open-source Python framework for rapidly creating interactive web interfaces. It turns a script into an app with only a few lines, making model-powered tools easier for others to access. section 10.3.12
Minimal question-answering interface
A small app can display a title, collect a question with st.text_input, and echo it with st.write. The interface can then connect that input to a retriever-reader question-answering pipeline and display its answer and context. section 10.3.12
Listing 10.24 A “Hello World” QA application with Streamlit
>>> import streamlit as st
>>> st.title("Ask me about NLPiA!")
>>> st.markdown("Welcome to the official Question Answering webapp"
... "for _Natural Language Processing in Action, 2nd Ed_")
>>> question = st.text_input("Enter your question here:")
>>> if question:
... st.write(f"You asked: '{question}'")
Shows a runnable “Hello World” Streamlit QA application using a title, markdown, text input, conditional logic, and output rendering. section 10.3.12








