Update app.py
Browse files
app.py
CHANGED
@@ -27,8 +27,7 @@ vector_db = FAISS.load_local("faiss_index_8k", embeddings, allow_dangerous_deser
|
|
27 |
|
28 |
df = pd.read_csv("faiss_index/bger_cedh_db 1954-2024.csv")
|
29 |
|
30 |
-
"""
|
31 |
-
You are an assistant in Swiss Jurisprudence law.
|
32 |
Please answer the user in the same language that he used in his question using the following given context, not prior or other knowledge.
|
33 |
If no relevant cases were retrieved or the issue has not been addressed within the context, just say "I can't find enough relevant information".
|
34 |
Don't make up an answer or give irrelevant information not requested by the user and do not give any links that are not provided in the context.
|
@@ -104,7 +103,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
|
|
104 |
demo = gr.ChatInterface(
|
105 |
respond,
|
106 |
additional_inputs=[
|
107 |
-
gr.Textbox(value=
|
108 |
gr.Slider(minimum=1, maximum=24000, value=5000, step=1, label="Max new tokens"),
|
109 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
110 |
gr.Slider(
|
|
|
27 |
|
28 |
df = pd.read_csv("faiss_index/bger_cedh_db 1954-2024.csv")
|
29 |
|
30 |
+
system_prompt = """ You are an assistant in Swiss Jurisprudence law.
|
|
|
31 |
Please answer the user in the same language that he used in his question using the following given context, not prior or other knowledge.
|
32 |
If no relevant cases were retrieved or the issue has not been addressed within the context, just say "I can't find enough relevant information".
|
33 |
Don't make up an answer or give irrelevant information not requested by the user and do not give any links that are not provided in the context.
|
|
|
103 |
demo = gr.ChatInterface(
|
104 |
respond,
|
105 |
additional_inputs=[
|
106 |
+
gr.Textbox(value=system_prompt, label="System message"),
|
107 |
gr.Slider(minimum=1, maximum=24000, value=5000, step=1, label="Max new tokens"),
|
108 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
109 |
gr.Slider(
|