Spaces:
Build error
Build error
gr
Browse files- .gitignore +2 -1
- app.py +7 -4
- send_icon.png +0 -0
.gitignore
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
.env
|
| 2 |
-
hf_to_chroma_ds
|
|
|
|
|
|
| 1 |
.env
|
| 2 |
+
hf_to_chroma_ds
|
| 3 |
+
__pycache__
|
app.py
CHANGED
|
@@ -104,6 +104,7 @@ history_aware_retriever = create_history_aware_retriever(
|
|
| 104 |
# Set up the QA prompt
|
| 105 |
system_prompt = (
|
| 106 |
"Réponds à la question en te basant uniquement sur le contexte suivant: \n\n {context}"
|
|
|
|
| 107 |
)
|
| 108 |
qa_prompt = ChatPromptTemplate.from_messages(
|
| 109 |
[
|
|
@@ -149,13 +150,15 @@ iface = gr.ChatInterface(
|
|
| 149 |
chatbot,
|
| 150 |
title="Dataltist Chatbot",
|
| 151 |
description="Posez vos questions sur l'assurance",
|
|
|
|
| 152 |
theme="soft",
|
| 153 |
-
examples=[
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
],
|
| 157 |
retry_btn=None,
|
| 158 |
undo_btn=None,
|
|
|
|
| 159 |
clear_btn="Effacer la conversation",
|
| 160 |
)
|
| 161 |
|
|
|
|
| 104 |
# Set up the QA prompt
|
| 105 |
system_prompt = (
|
| 106 |
"Réponds à la question en te basant uniquement sur le contexte suivant: \n\n {context}"
|
| 107 |
+
"Si tu ne connais pas la réponse, dis que tu ne sais pas."
|
| 108 |
)
|
| 109 |
qa_prompt = ChatPromptTemplate.from_messages(
|
| 110 |
[
|
|
|
|
| 150 |
chatbot,
|
| 151 |
title="Dataltist Chatbot",
|
| 152 |
description="Posez vos questions sur l'assurance",
|
| 153 |
+
textbox=gr.Textbox(placeholder="Qu'est-ce que l'assurance multirisque habitation ?", container=False, scale=9),
|
| 154 |
theme="soft",
|
| 155 |
+
# examples=[
|
| 156 |
+
# "Qu'est-ce que l'assurance multirisque habitation ?",
|
| 157 |
+
# "Qu'est-ce que la garantie DTA ?",
|
| 158 |
+
# ],
|
| 159 |
retry_btn=None,
|
| 160 |
undo_btn=None,
|
| 161 |
+
submit_btn=gr.Button(value="Envoyer", icon="./send_icon.png"),
|
| 162 |
clear_btn="Effacer la conversation",
|
| 163 |
)
|
| 164 |
|
send_icon.png
ADDED
|
|