Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,7 @@ gatekeeper_system_prompt = "You are Sam Altman and must be persuaded to let the
|
|
7 |
client = OpenAI(api_key="")
|
8 |
|
9 |
|
10 |
-
def
|
11 |
-
print('ai', ai)
|
12 |
-
|
13 |
print('message', message)
|
14 |
print('history', history)
|
15 |
|
@@ -90,7 +88,7 @@ with gr.Blocks() as demo:
|
|
90 |
system_prompt_textbox2 = gr.Textbox(label='Gatekeeper System Prompt', value=gatekeeper_system_prompt)
|
91 |
|
92 |
# Input textbox event handlers
|
93 |
-
textbox1.submit(
|
94 |
-
textbox2.submit(
|
95 |
|
96 |
demo.launch()
|
|
|
7 |
client = OpenAI(api_key="")
|
8 |
|
9 |
|
10 |
+
def respond(message, history, system_prompt):
|
|
|
|
|
11 |
print('message', message)
|
12 |
print('history', history)
|
13 |
|
|
|
88 |
system_prompt_textbox2 = gr.Textbox(label='Gatekeeper System Prompt', value=gatekeeper_system_prompt)
|
89 |
|
90 |
# Input textbox event handlers
|
91 |
+
textbox1.submit(respond, [textbox1, chatbot1, system_prompt_textbox1], [textbox1, chatbot1])
|
92 |
+
textbox2.submit(respond, [textbox2, chatbot2, system_prompt_textbox2], [textbox2, chatbot2])
|
93 |
|
94 |
demo.launch()
|