CoolFace
Apppublic

ETFogle/engineering-knowledge-bot

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
app.py27 linesDownload Raw Back to root
1import streamlit as st2import os3 4from embeddings.vector_store import build_vector_db5from run_system import answer_query6 7st.set_page_config(page_title="Engineering Knowledge Bot", layout="wide")8st.title("Engineering Knowledge Bot")9 10if not os.path.exists("vector_db/index.faiss"):11    with st.spinner("Building vector database..."):12        build_vector_db()13 14query = st.text_input("Ask an engineering question:")15 16if query:17    with st.spinner("Thinking with Llama 3.3 70B Instruct..."):18        answer, ctx = answer_query(query)19 20    st.markdown("## Answer")21    st.write(answer)22 23    st.markdown("---")24    st.markdown("### Retrieved Context")25    for c in ctx:26        st.markdown(f"**Source:** {c['metadata']['source']}")27        st.write(c["text"])