Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def extract_content_values(data):
|
|
46 |
|
47 |
return content_values
|
48 |
|
49 |
-
def chat(message, history):
|
50 |
global _client, _assistant, _thread
|
51 |
|
52 |
if _client == None:
|
@@ -83,12 +83,12 @@ gr.ChatInterface(
|
|
83 |
description="Ask Math Tutor any question",
|
84 |
theme="soft",
|
85 |
examples=["I need to solve the equation '3x + 13 = 11'. Can you help me?"],
|
86 |
-
cache_examples=
|
87 |
retry_btn=None,
|
88 |
undo_btn=None,
|
89 |
clear_btn="Clear",
|
90 |
#multimodal=True,
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
).launch()
|
|
|
46 |
|
47 |
return content_values
|
48 |
|
49 |
+
def chat(message, history, system_prompt):
|
50 |
global _client, _assistant, _thread
|
51 |
|
52 |
if _client == None:
|
|
|
83 |
description="Ask Math Tutor any question",
|
84 |
theme="soft",
|
85 |
examples=["I need to solve the equation '3x + 13 = 11'. Can you help me?"],
|
86 |
+
cache_examples=True,
|
87 |
retry_btn=None,
|
88 |
undo_btn=None,
|
89 |
clear_btn="Clear",
|
90 |
#multimodal=True,
|
91 |
+
additional_inputs=[
|
92 |
+
gr.Textbox("You are a personal math tutor. Answer questions briefly, in a sentence or less.", label="System Prompt"),
|
93 |
+
],
|
94 |
).launch()
|