Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 9 |
-
|
| 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)
|