vipee003 commited on
Commit
09c2b77
·
verified ·
1 Parent(s): 0f08e9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -4,11 +4,9 @@ chatbot = pipeline(model="facebook/blenderbot-400M-distill")
4
  message_list = []
5
  response_list = []
6
  def vanilla_chatbot(message, history):
7
- conversation = Conversation(text=message, past_user_inputs=message_list,
8
- generated_responses=response_list)
9
- bot = chatbot(conversation.messages[0]['content']) # working code
10
- return bot[-1]['generated_text']
11
 
12
- demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Mashdemy Chatbot", description="Enter text to start
13
- chatting.")
14
  demo_chatbot.launch(share = True)
 
4
  message_list = []
5
  response_list = []
6
  def vanilla_chatbot(message, history):
7
+ conversation = Conversation(text=message, past_user_inputs=message_list, generated_responses=response_list)
8
+ bot = chatbot(conversation.messages[0]['content']) # working code
9
+ return bot[-1]['generated_text']
 
10
 
11
+ demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Mashdemy Chatbot", description="Enter text to start chatting.")
 
12
  demo_chatbot.launch(share = True)