- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathserver.py
More file actions
Latest commit
21 lines (14 loc) · 400 Bytes
/
Copy pathserver.py
File metadata and controls
21 lines (14 loc) · 400 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
fromflaskimportFlask
fromflaskimportrequest
fromchatbot.chatbotimportChatBot
app=Flask(__name__)
@app.route('/reply', methods= ['POST'])
defreply():
ifrequest.method=='POST':
data=request.form
chatbot=ChatBot('Chatbot')
returnchatbot.respondInstant(data['message'])
defrun():
app.run()
if__name__=='__main__':
run()