Update app.py
Browse files
app.py
CHANGED
@@ -50,12 +50,10 @@ def respond(
|
|
50 |
context += "Case chunk: " + doc.page_content + "\n"
|
51 |
|
52 |
message = f"""
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
If you don't know just mention the sources.
|
58 |
-
|
59 |
"""
|
60 |
|
61 |
print(message)
|
@@ -90,7 +88,7 @@ demo = gr.ChatInterface(
|
|
90 |
respond,
|
91 |
additional_inputs=[
|
92 |
gr.Textbox(value="You are an assistant in Swiss Jurisprudence cases.", label="System message"),
|
93 |
-
gr.Slider(minimum=1, maximum=24000, value=
|
94 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
95 |
gr.Slider(
|
96 |
minimum=0.1,
|
|
|
50 |
context += "Case chunk: " + doc.page_content + "\n"
|
51 |
|
52 |
message = f"""
|
53 |
+
The user is asking for information about the following: {message}.
|
54 |
+
Answer him in his own language using the information from the following Swiss federal jurisprudence cases:
|
55 |
+
{context}
|
56 |
+
Please mention your sources in your answer, including the urls
|
|
|
|
|
57 |
"""
|
58 |
|
59 |
print(message)
|
|
|
88 |
respond,
|
89 |
additional_inputs=[
|
90 |
gr.Textbox(value="You are an assistant in Swiss Jurisprudence cases.", label="System message"),
|
91 |
+
gr.Slider(minimum=1, maximum=24000, value=8000, step=1, label="Max new tokens"),
|
92 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
93 |
gr.Slider(
|
94 |
minimum=0.1,
|