| | import streamlit as st |
| | from prediction import Prediction |
| |
|
| | |
| | @st.cache_resource |
| | def load_predictor(): |
| | return Prediction() |
| |
|
| | st.set_page_config(page_title="Bangla-English QA", layout="centered") |
| | st.title("Multilingual QA System") |
| | st.markdown("Ask a question in **Bangla** or **English**, and get an AI-generated answer based on KB context.") |
| |
|
| | |
| | user_query = st.text_input("🔎 Enter your question:", "") |
| |
|
| | |
| | predictor = load_predictor() |
| |
|
| | if st.button("Generate Answer") and user_query.strip(): |
| | with st.spinner("Generating answer..."): |
| | result = predictor.predict(user_query) |
| | st.markdown("### Answer") |
| | st.write(result) |
| |
|