Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from rag_utils import load_faiss_index, get_embedding_model, query_index, generate_answer | |
| st.title("🎓 Edu Pilot") | |
| index, documents = load_faiss_index() | |
| model_embed = get_embedding_model() | |
| user_input = st.text_input("Pose ta question ici :") | |
| if user_input: | |
| top_docs = query_index(user_input, index, documents, model_embed) | |
| context = "\n".join(top_docs) | |
| print("🧠 Résultats RAG :", top_docs) | |
| response = generate_answer(user_input, context) | |
| st.markdown("### ✨ Réponse du chatbot :") | |
| st.write(response) |