Update app.py
Browse files
app.py
CHANGED
@@ -231,7 +231,8 @@ def reset_name_interface():
|
|
231 |
def reset_all():
|
232 |
message1 = reset_chat_interface()
|
233 |
message2 = reset_name_interface()
|
234 |
-
|
|
|
235 |
|
236 |
chat_bot=gr.ChatInterface(
|
237 |
fn=generate,
|
@@ -253,7 +254,7 @@ name_interface = gr.Interface(
|
|
253 |
)
|
254 |
|
255 |
|
256 |
-
with gr.Blocks() as
|
257 |
gr.Markdown("Press the button below to restart the chat Interface.")
|
258 |
with gr.Row():
|
259 |
out = gr.Textbox(label="Output")
|
@@ -261,7 +262,7 @@ with gr.Blocks() as demo:
|
|
261 |
btn.click(fn=reset_all, inputs=None, outputs=out)
|
262 |
|
263 |
|
264 |
-
tabs = gr.TabbedInterface([name_interface, chat_bot], ["User Info", "Chat Bot"])
|
265 |
|
266 |
if __name__ == "__main__":
|
267 |
tabs.launch(debug=True,share=False,inbrowser=True)
|
|
|
231 |
def reset_all():
|
232 |
message1 = reset_chat_interface()
|
233 |
message2 = reset_name_interface()
|
234 |
+
message3 = load_model()
|
235 |
+
return f"{message1} || {message2} || {message3}"
|
236 |
|
237 |
chat_bot=gr.ChatInterface(
|
238 |
fn=generate,
|
|
|
254 |
)
|
255 |
|
256 |
|
257 |
+
with gr.Blocks() as reset_section:
|
258 |
gr.Markdown("Press the button below to restart the chat Interface.")
|
259 |
with gr.Row():
|
260 |
out = gr.Textbox(label="Output")
|
|
|
262 |
btn.click(fn=reset_all, inputs=None, outputs=out)
|
263 |
|
264 |
|
265 |
+
tabs = gr.TabbedInterface([name_interface, chat_bot,reset_section], ["User Info", "Chat Bot","Reset Chatbot"])
|
266 |
|
267 |
if __name__ == "__main__":
|
268 |
tabs.launch(debug=True,share=False,inbrowser=True)
|