Spaces:
Runtime error
Runtime error
Commit
·
5a10654
1
Parent(s):
8a7ac62
Test
Browse files
app.py
CHANGED
@@ -24,11 +24,8 @@ def respond(message, chat_history):
|
|
24 |
time.sleep(2)
|
25 |
return "", chat_history
|
26 |
|
27 |
-
def
|
28 |
-
|
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):
|
@@ -58,7 +55,9 @@ def interface(tab_name):
|
|
58 |
gpt_S3_chatbot = gr.Chatbot(label="gpt-3.5")
|
59 |
clear = gr.ClearButton([textbox_prompt, vicuna_S3_chatbot])
|
60 |
|
61 |
-
|
|
|
|
|
62 |
|
63 |
with gr.Blocks() as demo:
|
64 |
gr.Markdown("# LLM Evaluator With Linguistic Scrutiny")
|
|
|
24 |
time.sleep(2)
|
25 |
return "", chat_history
|
26 |
|
27 |
+
def textbox_submit(tab_name, textbox, chatbot):
|
28 |
+
prompt = template_single.format(tab_name, textbox.value)
|
|
|
|
|
|
|
29 |
respond(prompt, chatbot)
|
30 |
|
31 |
def interface(tab_name):
|
|
|
55 |
gpt_S3_chatbot = gr.Chatbot(label="gpt-3.5")
|
56 |
clear = gr.ClearButton([textbox_prompt, vicuna_S3_chatbot])
|
57 |
|
58 |
+
textbox_prompt.submit(textbox_submit, tab_name, textbox_prompt, vicuna_S1_chatbot)
|
59 |
+
textbox_prompt.submit(textbox_submit, tab_name, textbox_prompt, vicuna_S2_chatbot)
|
60 |
+
textbox_prompt.submit(textbox_submit, tab_name, textbox_prompt, vicuna_S3_chatbot)
|
61 |
|
62 |
with gr.Blocks() as demo:
|
63 |
gr.Markdown("# LLM Evaluator With Linguistic Scrutiny")
|