Spaces:
Paused
Paused
derek-thomas
commited on
Commit
·
3014aa6
1
Parent(s):
0d73887
Moving examples
Browse files
app.py
CHANGED
|
@@ -88,6 +88,9 @@ with gr.Blocks() as demo:
|
|
| 88 |
)
|
| 89 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
| 90 |
|
|
|
|
|
|
|
|
|
|
| 91 |
prompt_html = gr.HTML()
|
| 92 |
# Turn off interactivity while generating if you click
|
| 93 |
txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
|
@@ -103,9 +106,6 @@ with gr.Blocks() as demo:
|
|
| 103 |
# Turn it back on
|
| 104 |
txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
|
| 105 |
|
| 106 |
-
# Examples
|
| 107 |
-
gr.Examples(examples, txt)
|
| 108 |
-
|
| 109 |
with gr.Tab("RAGDemo + HyDE"):
|
| 110 |
hyde_chatbot = gr.Chatbot(
|
| 111 |
[],
|
|
@@ -126,6 +126,9 @@ with gr.Blocks() as demo:
|
|
| 126 |
)
|
| 127 |
hyde_txt_btn = gr.Button(value="Submit text", scale=1)
|
| 128 |
|
|
|
|
|
|
|
|
|
|
| 129 |
hyde_prompt_html = gr.HTML()
|
| 130 |
# Turn off interactivity while generating if you click
|
| 131 |
hyde_txt_msg = hyde_txt_btn.click(add_text, [hyde_chatbot, hyde_txt], [hyde_chatbot, hyde_txt], queue=False).then(
|
|
@@ -141,8 +144,5 @@ with gr.Blocks() as demo:
|
|
| 141 |
# Turn it back on
|
| 142 |
hyde_txt_msg.then(lambda: gr.Textbox(interactive=True), None, [hyde_txt], queue=False)
|
| 143 |
|
| 144 |
-
# Examples
|
| 145 |
-
gr.Examples(examples, hyde_txt)
|
| 146 |
-
|
| 147 |
demo.queue()
|
| 148 |
demo.launch(debug=True)
|
|
|
|
| 88 |
)
|
| 89 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
| 90 |
|
| 91 |
+
# Examples
|
| 92 |
+
gr.Examples(examples, txt)
|
| 93 |
+
|
| 94 |
prompt_html = gr.HTML()
|
| 95 |
# Turn off interactivity while generating if you click
|
| 96 |
txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
|
|
|
| 106 |
# Turn it back on
|
| 107 |
txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
|
| 108 |
|
|
|
|
|
|
|
|
|
|
| 109 |
with gr.Tab("RAGDemo + HyDE"):
|
| 110 |
hyde_chatbot = gr.Chatbot(
|
| 111 |
[],
|
|
|
|
| 126 |
)
|
| 127 |
hyde_txt_btn = gr.Button(value="Submit text", scale=1)
|
| 128 |
|
| 129 |
+
# Examples
|
| 130 |
+
gr.Examples(examples, hyde_txt)
|
| 131 |
+
|
| 132 |
hyde_prompt_html = gr.HTML()
|
| 133 |
# Turn off interactivity while generating if you click
|
| 134 |
hyde_txt_msg = hyde_txt_btn.click(add_text, [hyde_chatbot, hyde_txt], [hyde_chatbot, hyde_txt], queue=False).then(
|
|
|
|
| 144 |
# Turn it back on
|
| 145 |
hyde_txt_msg.then(lambda: gr.Textbox(interactive=True), None, [hyde_txt], queue=False)
|
| 146 |
|
|
|
|
|
|
|
|
|
|
| 147 |
demo.queue()
|
| 148 |
demo.launch(debug=True)
|