Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
from rag_utils_unsloth import load_faiss_index, get_embedding_model, query_index, generate_answer
|
3 |
-
|
4 |
-
st.title("🎓 EduPilot (Unsloth + Mistral 4bit CPU)")
|
5 |
-
|
6 |
-
index, documents = load_faiss_index()
|
7 |
-
model_embed = get_embedding_model()
|
8 |
-
|
9 |
-
user_input = st.text_input("Pose ta question ici :")
|
10 |
-
|
11 |
-
if user_input:
|
12 |
-
top_docs = query_index(user_input, index, documents, model_embed)
|
13 |
-
context = "\n".join(top_docs)
|
14 |
-
response = generate_answer(user_input, context)
|
15 |
-
st.markdown("### ✨ Réponse du chatbot :")
|
16 |
-
st.write(response)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|