Spaces:
Runtime error
Runtime error
Commit
·
9b06190
1
Parent(s):
b85d51d
test
Browse files
app.py
CHANGED
@@ -51,9 +51,9 @@ 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 |
-
textbox_prompt.submit(respond, [
|
55 |
-
textbox_prompt.submit(respond, [
|
56 |
-
textbox_prompt.submit(respond, [
|
57 |
|
58 |
|
59 |
with gr.Blocks() as demo:
|
@@ -63,29 +63,28 @@ with gr.Blocks() as demo:
|
|
63 |
interface("Noun")
|
64 |
|
65 |
with gr.Tab("Determiner"):
|
66 |
-
|
67 |
-
# gr.Markdown(" Description ")
|
68 |
|
69 |
-
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
with gr.Tab("Noun phrase"):
|
91 |
interface("Noun phrase")
|
@@ -96,8 +95,8 @@ with gr.Blocks() as demo:
|
|
96 |
with gr.Tab("T-units"):
|
97 |
interface("T-units")
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
demo.launch()
|
|
|
51 |
gpt_S3_chatbot = gr.Chatbot(label="gpt-3.5")
|
52 |
clear = gr.ClearButton([textbox_prompt, vicuna_S3_chatbot])
|
53 |
|
54 |
+
textbox_prompt.submit(respond, [textbox_prompt, vicuna_S1_chatbot], [textbox_prompt, vicuna_S1_chatbot])
|
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:
|
|
|
63 |
interface("Noun")
|
64 |
|
65 |
with gr.Tab("Determiner"):
|
66 |
+
gr.Markdown(" Description ")
|
|
|
67 |
|
68 |
+
prompt_CHUNK = gr.Textbox(show_label=False, placeholder="Write a prompt and press enter")
|
69 |
|
70 |
+
gr.Markdown("Strategy 1 QA")
|
71 |
+
with gr.Row():
|
72 |
+
vicuna_S1_chatbot_CHUNK = gr.Chatbot(label="vicuna-7b")
|
73 |
+
llama_S1_chatbot_CHUNK = gr.Chatbot(label="llama-7b")
|
74 |
+
gpt_S1_chatbot_CHUNK = gr.Chatbot(label="gpt-3.5")
|
75 |
+
clear = gr.ClearButton([prompt_CHUNK, vicuna_S1_chatbot_CHUNK])
|
76 |
+
gr.Markdown("Strategy 2 Instruction")
|
77 |
+
with gr.Row():
|
78 |
+
vicuna_S2_chatbot_CHUNK = gr.Chatbot(label="vicuna-7b")
|
79 |
+
llama_S2_chatbot_CHUNK = gr.Chatbot(label="llama-7b")
|
80 |
+
gpt_S2_chatbot_CHUNK = gr.Chatbot(label="gpt-3.5")
|
81 |
+
clear = gr.ClearButton([prompt_CHUNK, vicuna_S2_chatbot_CHUNK])
|
82 |
+
gr.Markdown("Strategy 3 Structured Prompting")
|
83 |
+
with gr.Row():
|
84 |
+
vicuna_S3_chatbot_CHUNK = gr.Chatbot(label="vicuna-7b")
|
85 |
+
llama_S3_chatbot_CHUNK = gr.Chatbot(label="llama-7b")
|
86 |
+
gpt_S3_chatbot_CHUNK = gr.Chatbot(label="gpt-3.5")
|
87 |
+
clear = gr.ClearButton([prompt_CHUNK, vicuna_S3_chatbot_CHUNK])
|
88 |
|
89 |
with gr.Tab("Noun phrase"):
|
90 |
interface("Noun phrase")
|
|
|
95 |
with gr.Tab("T-units"):
|
96 |
interface("T-units")
|
97 |
|
98 |
+
prompt_CHUNK.submit(respond, [prompt_CHUNK, vicuna_S1_chatbot_CHUNK], [prompt_CHUNK, vicuna_S1_chatbot_CHUNK])
|
99 |
+
prompt_CHUNK.submit(respond, [prompt_CHUNK, vicuna_S2_chatbot_CHUNK], [prompt_CHUNK, vicuna_S2_chatbot_CHUNK])
|
100 |
+
prompt_CHUNK.submit(respond, [prompt_CHUNK, vicuna_S3_chatbot_CHUNK], [prompt_CHUNK, vicuna_S3_chatbot_CHUNK])
|
101 |
|
102 |
demo.launch()
|