Commit
·
f3f3f8f
1
Parent(s):
0c1b111
Update app.py
Browse files
app.py
CHANGED
@@ -68,8 +68,8 @@ def respond_prompt1(Selbstauskunft, Kernfrage, chat, text):
|
|
68 |
|
69 |
|
70 |
if ("<ENDOFQA>" in output_prompt1) or len(chat) > 10:
|
71 |
-
sachverhalt = respond_prompt2(Selbstauskunft, Kernfrage, chat)
|
72 |
-
chat.append(("Danke für
|
73 |
|
74 |
return chat, gr.update(value="", visible=False), gr.update(value=sachverhalt, visible=True), gr.update(value="Weiter", visible=True)
|
75 |
|
@@ -119,8 +119,8 @@ def respond_prompt3(Selbstauskunft, Kernfrage, chat, Sachverhalt):
|
|
119 |
return gr.update(value=output_prompt3, visible=True), gr.update(visible=False)
|
120 |
|
121 |
with gr.Blocks() as demo:
|
122 |
-
Selbstauskunft = gr.Textbox("", label="Erzähl mir, was passiert ist")
|
123 |
-
Kernfrage = gr.Textbox("", label="Stelle eine Frage, die ich dir beantworten soll
|
124 |
|
125 |
button_prompt1 = gr.Button(value="Weiter")
|
126 |
|
@@ -131,7 +131,7 @@ with gr.Blocks() as demo:
|
|
131 |
msg = gr.Textbox(visible=False, label="Antwort")
|
132 |
Sachverhalt = gr.Textbox(visible=False, label = "Zusammenfassung")
|
133 |
Erstberatung = gr.Textbox(visible=False, label="Rechtliche Einschätzung")
|
134 |
-
button_erstberatung = gr.Button(value="Weiter", visible=False)
|
135 |
|
136 |
button_prompt1.click(respond_prompt0, [Selbstauskunft, Kernfrage, chat], outputs=[label_prompt0, chat, msg])
|
137 |
|
|
|
68 |
|
69 |
|
70 |
if ("<ENDOFQA>" in output_prompt1) or len(chat) > 10:
|
71 |
+
sachverhalt = respond_prompt2(Selbstauskunft, Kernfrage, chat).replace("Bürger", "Mandant")
|
72 |
+
chat.append(("Danke für deine Antworten. Hier findest du eine aufarbeitete Zusamenfassung des Sachverhalts. Bitte prüfe dieese und ergänze ggf. noch etwas, bevor ich zu meiner Einschätzung komme.", ""))
|
73 |
|
74 |
return chat, gr.update(value="", visible=False), gr.update(value=sachverhalt, visible=True), gr.update(value="Weiter", visible=True)
|
75 |
|
|
|
119 |
return gr.update(value=output_prompt3, visible=True), gr.update(visible=False)
|
120 |
|
121 |
with gr.Blocks() as demo:
|
122 |
+
Selbstauskunft = gr.Textbox("", label="Erzähl mir, was passiert ist.")
|
123 |
+
Kernfrage = gr.Textbox("", label="Stelle eine Frage, die ich dir beantworten soll.")
|
124 |
|
125 |
button_prompt1 = gr.Button(value="Weiter")
|
126 |
|
|
|
131 |
msg = gr.Textbox(visible=False, label="Antwort")
|
132 |
Sachverhalt = gr.Textbox(visible=False, label = "Zusammenfassung")
|
133 |
Erstberatung = gr.Textbox(visible=False, label="Rechtliche Einschätzung")
|
134 |
+
button_erstberatung = gr.Button(value="Weiter zur juristischen Einschätzung", visible=False)
|
135 |
|
136 |
button_prompt1.click(respond_prompt0, [Selbstauskunft, Kernfrage, chat], outputs=[label_prompt0, chat, msg])
|
137 |
|