Programmes commited on
Commit
354ebe9
·
verified ·
1 Parent(s): 5c17b12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,14 +1,12 @@
1
  import streamlit as st
2
- from rag_utils import load_faiss_index, get_embedding_model, query_index, generate_answer, nettoyer_context
3
 
4
  st.set_page_config(page_title="🎓 EduPilot", page_icon="🧠")
5
  st.title("🎓 EduPilot (LLM local quantisé)")
6
 
7
- # Chargement de l’index et du modèle d'embedding
8
  index, documents = load_faiss_index()
9
  model_embed = get_embedding_model()
10
 
11
- # Interface utilisateur
12
  user_input = st.text_input("Pose ta question ici :")
13
 
14
  if user_input:
@@ -16,7 +14,7 @@ if user_input:
16
  context = nettoyer_context("\n".join(top_docs))
17
  response = generate_answer(user_input, context)
18
 
19
- st.markdown("### ✨ Réponse d'Edu Pilot :")
20
  st.write(response)
21
 
22
  st.markdown("---")
 
1
  import streamlit as st
2
+ from rag_utils_llamacpp import load_faiss_index, get_embedding_model, query_index, generate_answer, nettoyer_context
3
 
4
  st.set_page_config(page_title="🎓 EduPilot", page_icon="🧠")
5
  st.title("🎓 EduPilot (LLM local quantisé)")
6
 
 
7
  index, documents = load_faiss_index()
8
  model_embed = get_embedding_model()
9
 
 
10
  user_input = st.text_input("Pose ta question ici :")
11
 
12
  if user_input:
 
14
  context = nettoyer_context("\n".join(top_docs))
15
  response = generate_answer(user_input, context)
16
 
17
+ st.markdown("### ✨ Réponse du chatbot :")
18
  st.write(response)
19
 
20
  st.markdown("---")