Spaces:
Runtime error
Runtime error
Srinivasulu kethanaboina
commited on
Commit
•
1c9719e
1
Parent(s):
a3629b9
Update app.py
Browse files
app.py
CHANGED
@@ -91,8 +91,8 @@ def handle_query(query, cookies=None):
|
|
91 |
|
92 |
# Define the button click function
|
93 |
def retrieve_history_and_redirect():
|
94 |
-
#
|
95 |
-
return
|
96 |
|
97 |
# Define your Gradio chat interface function
|
98 |
def chat_interface(message, history):
|
@@ -144,11 +144,8 @@ with gr.Blocks(css=css) as demo:
|
|
144 |
# Button to retrieve history and redirect
|
145 |
redirect_button = gr.Button("Retrieve History & Redirect")
|
146 |
|
147 |
-
#
|
148 |
-
|
149 |
-
|
150 |
-
# Connect the button with the function, and output the status message
|
151 |
-
redirect_button.click(fn=retrieve_history_and_redirect, inputs=[], outputs=redirect_message)
|
152 |
|
153 |
# Add a JavaScript function to handle redirection after the Gradio event is processed
|
154 |
redirect_button.click(fn=None,js="() => { window.open('https://redfernstech.com/chat-bot-test', '_blank'); }")
|
|
|
91 |
|
92 |
# Define the button click function
|
93 |
def retrieve_history_and_redirect():
|
94 |
+
# Directly save the chat history without displaying any message
|
95 |
+
return
|
96 |
|
97 |
# Define your Gradio chat interface function
|
98 |
def chat_interface(message, history):
|
|
|
144 |
# Button to retrieve history and redirect
|
145 |
redirect_button = gr.Button("Retrieve History & Redirect")
|
146 |
|
147 |
+
# Connect the button with the function, and handle the redirection
|
148 |
+
redirect_button.click(fn=retrieve_history_and_redirect)
|
|
|
|
|
|
|
149 |
|
150 |
# Add a JavaScript function to handle redirection after the Gradio event is processed
|
151 |
redirect_button.click(fn=None,js="() => { window.open('https://redfernstech.com/chat-bot-test', '_blank'); }")
|