vaishnaveswar commited on
Commit
3ce8148
·
verified ·
1 Parent(s): ef1ede5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -25
app.py CHANGED
@@ -36,30 +36,17 @@ def on_reset_button_click():
36
  llm_svc.store={}
37
 
38
 
39
- with gr.Blocks() as demo:
40
- with gr.Row():
41
- chatbot = gr.ChatInterface(
42
- respond,
43
- additional_inputs=[gr.Button("Reset Chat Memory Cache")]
44
- )
45
- reset_button = chatbot.additional_inputs[0]
46
- reset_button.click(on_reset_button_click)
47
-
48
- if __name__ == "__main__":
49
- demo.launch()
50
-
51
-
52
- # # Define the main block
53
- # if __name__ == '__main__':
54
- # logging.info("Starting AIVIz Bot")
55
-
56
- # with gr.Blocks() as demo:
57
- # # Create the ChatInterface
58
- # chat_interface = gr.ChatInterface(fn=respond)
59
- # # Create a button and bind the reset function to it
60
- # reset_button = gr.Button("Reset Chat Memory Cache")
61
 
62
- # reset_button.click(on_reset_button_click)
63
 
64
- # # Launch the interface with a shareable link
65
- # demo.launch(share=True)
 
36
  llm_svc.store={}
37
 
38
 
39
+ # Define the main block
40
+ if __name__ == '__main__':
41
+ logging.info("Starting AIVIz Bot")
42
+
43
+ with gr.Blocks() as demo:
44
+ # Create the ChatInterface
45
+ chat_interface = gr.ChatInterface(fn=respond)
46
+ # Create a button and bind the reset function to it
47
+ reset_button = gr.Button("Reset Chat Memory Cache")
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
+ reset_button.click(on_reset_button_click)
50
 
51
+ # Launch the interface with a shareable link
52
+ demo.launch(share=True)