Spaces:
Runtime error
Runtime error
ubermenchh
commited on
Commit
•
d774b8a
1
Parent(s):
3486f33
Update app.py
Browse files
app.py
CHANGED
@@ -40,15 +40,15 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
|
|
40 |
chatbot = gr.Chatbot([], elem_id='chatbot')
|
41 |
|
42 |
with gr.Row():
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
with gr.Row():
|
48 |
question = gr.Textbox(label='Question', placeholder='Type your query...')
|
49 |
submit_btn = gr.Button('Submit')
|
50 |
|
51 |
-
load_paper.click(
|
52 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(bot, chatbot, chatbot)
|
53 |
submit_btn.click(add_text, [chatbot, question], [chatbot, question]).then(bot, chatbot, chatbot)
|
54 |
|
|
|
40 |
chatbot = gr.Chatbot([], elem_id='chatbot')
|
41 |
|
42 |
with gr.Row():
|
43 |
+
web_address = gr.Textbox(label='Web Address', placeholder='http://karpathy.github.io/2019/04/25/recipe/')
|
44 |
+
website_status = gr.Textbox(label='Status', placeholder='', interactive=False)
|
45 |
+
load_website = gr.Button('Load Website')
|
46 |
|
47 |
with gr.Row():
|
48 |
question = gr.Textbox(label='Question', placeholder='Type your query...')
|
49 |
submit_btn = gr.Button('Submit')
|
50 |
|
51 |
+
load_paper.click(load_website, inputs=[web_address], outputs=[website_status], queue=False)
|
52 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(bot, chatbot, chatbot)
|
53 |
submit_btn.click(add_text, [chatbot, question], [chatbot, question]).then(bot, chatbot, chatbot)
|
54 |
|