Spaces:
Runtime error
Runtime error
Commit
·
8a7ac62
1
Parent(s):
95ea71c
test
Browse files
app.py
CHANGED
@@ -24,6 +24,13 @@ def respond(message, chat_history):
|
|
24 |
time.sleep(2)
|
25 |
return "", chat_history
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
def interface(tab_name):
|
28 |
gr.Markdown(" Description ")
|
29 |
|
@@ -51,10 +58,7 @@ def interface(tab_name):
|
|
51 |
gpt_S3_chatbot = gr.Chatbot(label="gpt-3.5")
|
52 |
clear = gr.ClearButton([textbox_prompt, vicuna_S3_chatbot])
|
53 |
|
54 |
-
|
55 |
-
textbox_prompt.submit(respond, [textbox_prompt, vicuna_S2_chatbot], [textbox_prompt, vicuna_S2_chatbot])
|
56 |
-
textbox_prompt.submit(respond, [textbox_prompt, vicuna_S3_chatbot], [textbox_prompt, vicuna_S3_chatbot])
|
57 |
-
|
58 |
|
59 |
with gr.Blocks() as demo:
|
60 |
gr.Markdown("# LLM Evaluator With Linguistic Scrutiny")
|
|
|
24 |
time.sleep(2)
|
25 |
return "", chat_history
|
26 |
|
27 |
+
def send_button_click(prompt, api_key, chatbot):
|
28 |
+
# Perform actions with both the prompt and api_key
|
29 |
+
print(f"Prompt: {prompt}, API Key: {api_key}")
|
30 |
+
|
31 |
+
# Call the respond function
|
32 |
+
respond(prompt, chatbot)
|
33 |
+
|
34 |
def interface(tab_name):
|
35 |
gr.Markdown(" Description ")
|
36 |
|
|
|
58 |
gpt_S3_chatbot = gr.Chatbot(label="gpt-3.5")
|
59 |
clear = gr.ClearButton([textbox_prompt, vicuna_S3_chatbot])
|
60 |
|
61 |
+
send_button = gr.Button(text="Send", onclick=send_button_click, args=[textbox_prompt, api_key, vicuna_S1_chatbot])
|
|
|
|
|
|
|
62 |
|
63 |
with gr.Blocks() as demo:
|
64 |
gr.Markdown("# LLM Evaluator With Linguistic Scrutiny")
|