tommy24 commited on
Commit
9ce197c
·
1 Parent(s): 1829fa3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -1,21 +1,21 @@
1
- import gradio as gr
2
- from flask import Flassk, request
3
 
4
- app = Flask(__name__)
5
 
6
- def greet(name):
7
- return "Hello " + name + "!!"
8
 
9
- @app.route('/receive_msg', methods=['POST','GET'])
10
- def webhook():
11
- if request.args.get("hub.mode") == "subscribe" and request.args.get("hub.challenge"):
12
- if not request.args.get("hub.verify_token")== "EAAMjTT3ZC7NUBAEtTAhYFiaY6g6DkZCrhYnnNLY0QKiP2yxHfTiNkJSUBKrZB59pzv8fYusfaIqRZBrhVdRNWE3Om3SH4PUcXe3mMRkVU9g545CorZARHgqMxjQVyjLPmF0eTjJtTQSBUR1PTaq8WJhlZAZC6YORZCZAM3TMLFawCGauAHCUPWxBz5sGGoZAjkVua9bTw6PXV58tEYXRZAnVCak":
13
- return "Verification token missmatch", 403
14
- return request.args['hub.challenge'], 200
15
- return "Hello world", 200
16
 
17
- if __name__ == "__main__":
18
- app.run(debug=True)
19
 
20
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
21
- iface.launch()
 
1
+ # import gradio as gr
2
+ # from flask import Flassk, request
3
 
4
+ # app = Flask(__name__)
5
 
6
+ # def greet(name):
7
+ # return "Hello " + name + "!!"
8
 
9
+ # @app.route('/receive_msg', methods=['POST','GET'])
10
+ # def webhook():
11
+ # if request.args.get("hub.mode") == "subscribe" and request.args.get("hub.challenge"):
12
+ # if not request.args.get("hub.verify_token")== "EAAMjTT3ZC7NUBAEtTAhYFiaY6g6DkZCrhYnnNLY0QKiP2yxHfTiNkJSUBKrZB59pzv8fYusfaIqRZBrhVdRNWE3Om3SH4PUcXe3mMRkVU9g545CorZARHgqMxjQVyjLPmF0eTjJtTQSBUR1PTaq8WJhlZAZC6YORZCZAM3TMLFawCGauAHCUPWxBz5sGGoZAjkVua9bTw6PXV58tEYXRZAnVCak":
13
+ # return "Verification token missmatch", 403
14
+ # return request.args['hub.challenge'], 200
15
+ # return "Hello world", 200
16
 
17
+ # if __name__ == "__main__":
18
+ # app.run(debug=True)
19
 
20
+ # iface = gr.Interface(fn=greet, inputs="text", outputs="text")
21
+ # iface.launch()