Commit
·
76cab42
1
Parent(s):
1e477fc
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,6 +21,7 @@ msg_panel = chat_interface.send(
|
|
| 21 |
respond=False,
|
| 22 |
)
|
| 23 |
apikey = pn.widgets.TextInput(name='OPENAI API KEY', placeholder="sk-********")
|
|
|
|
| 24 |
website_url_input = pn.widgets.TextInput(name='Website URL', placeholder="https://www.google.com/")
|
| 25 |
submit = pn.widgets.Button(name='Submit', button_type='primary')
|
| 26 |
|
|
@@ -77,12 +78,13 @@ def even_or_odd(contents, user, instance):
|
|
| 77 |
|
| 78 |
return response_string
|
| 79 |
# Set the callback function for the button click event
|
|
|
|
| 80 |
submit.on_click(on_submit)
|
| 81 |
|
| 82 |
# Instantiate the template with widgets displayed in the sidebar
|
| 83 |
template = pn.template.FastListTemplate(
|
| 84 |
title='Chat with Web',
|
| 85 |
-
sidebar=[apikey,website_url_input, submit,
|
| 86 |
msg_panel],
|
| 87 |
header=[],
|
| 88 |
|
|
|
|
| 21 |
respond=False,
|
| 22 |
)
|
| 23 |
apikey = pn.widgets.TextInput(name='OPENAI API KEY', placeholder="sk-********")
|
| 24 |
+
apply = pn.widgets.Button(name='Submit', button_type='primary')
|
| 25 |
website_url_input = pn.widgets.TextInput(name='Website URL', placeholder="https://www.google.com/")
|
| 26 |
submit = pn.widgets.Button(name='Submit', button_type='primary')
|
| 27 |
|
|
|
|
| 78 |
|
| 79 |
return response_string
|
| 80 |
# Set the callback function for the button click event
|
| 81 |
+
apply.on_click(on_submit)
|
| 82 |
submit.on_click(on_submit)
|
| 83 |
|
| 84 |
# Instantiate the template with widgets displayed in the sidebar
|
| 85 |
template = pn.template.FastListTemplate(
|
| 86 |
title='Chat with Web',
|
| 87 |
+
sidebar=[apikey,apply,website_url_input, submit,
|
| 88 |
msg_panel],
|
| 89 |
header=[],
|
| 90 |
|