Laura Biester commited on
Commit
8ad0b98
·
1 Parent(s): a154090

Cleaning this up

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -68,15 +68,14 @@ def middchat(bot_cache: BotCache, message: str, history: List[Tuple[str, str]])
68
 
69
  cache = BotCache()
70
  chat_partial = partial(middchat, cache)
71
- chatbot = gr.Chatbot([("Welcome to MiddChat! " + chat_partial("", []), None)])
 
72
  demo = gr.ChatInterface(
73
  fn=chat_partial,
74
  chatbot=chatbot,
75
  title="MiddChat",
76
- clear_btn="Reset chat history and talk to another bot",
77
  retry_btn=None,
78
- undo_btn=None)
 
79
 
80
- with gr.Blocks():
81
- demo.clear_btn.click(lambda: "Clear was clicked")
82
  demo.launch(share=True)
 
68
 
69
  cache = BotCache()
70
  chat_partial = partial(middchat, cache)
71
+ initial_msg = "Welcome to MiddChat!\n" + chat_partial("", []) + "\nPlease note that if you want to reset your chat, you should refresh this page!"
72
+ chatbot = gr.Chatbot([(initial_msg, None)])
73
  demo = gr.ChatInterface(
74
  fn=chat_partial,
75
  chatbot=chatbot,
76
  title="MiddChat",
 
77
  retry_btn=None,
78
+ undo_btn=None,
79
+ clear_btn=None,)
80
 
 
 
81
  demo.launch(share=True)