Spaces:
Sleeping
Sleeping
File size: 760 Bytes
f9807fc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import streamlit as st
from chatbot_utils import AmharicChatbot
st.set_page_config(page_title="Amharic SRH Chatbot", layout="centered")
st.title("π€ α ααα α€α α»α΅α¦α΅")
st.markdown("α΅α ααα΅α α΅α αα
αα΅ α€α α₯α«α α αα΅? α₯α£αα α«ααα‘α’")
@st.cache_resource
def load_bot():
return AmharicChatbot("amharic_srh_qa.csv")
bot = load_bot()
query = st.text_input("π¬ α₯α«ααα α«α΅αα‘:", "")
if st.button("ααα΅ α αα£"):
if query:
results = bot.get_answer(query)
for i, (q, a) in enumerate(results):
st.write(f"**Q{i+1}:** {q}")
st.success(f"**A{i+1}:** {a}")
else:
st.warning("α₯α£αα α₯α«α α«α΅αα‘α’")
|