コード例 #1
0
ファイル: run.py プロジェクト: AdaptiveCB/chatbot-adaptativo
from chatbot import app

if __name__ == '__main__':
  app.run(debug=True)
コード例 #2
0
from chatbot import app
from settings import HOST_NAME, HOST_PORT, DEBUG


# run Flask app
if __name__ == "__main__":
	app.run(host=HOST_NAME, port=HOST_PORT, debug=DEBUG)
コード例 #3
0
from chatbot.app import run

run()
コード例 #4
0
from chatbot import app

if __name__ == "__main__":
    app.run()
コード例 #5
0
ファイル: wsgi.py プロジェクト: krinkere/ChatBot
# gunicorn can't find app when it is not named application
from chatbot import app as application


if __name__ == "__main__":
    application.run()
コード例 #6
0
ファイル: app.py プロジェクト: NohaIhab/Chatbot
import os

from chatbot import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 5000)), debug=True)
コード例 #7
0
ファイル: app.py プロジェクト: totalhack/chatbot
        'status': 'success',
        'interaction': 'Great job, you are done.',
        'action': Actions.EndConversation
    }
    return jsonr(response)


@app.route('/fulfillment_with_error_status', methods=['POST'])
def fulfillment_with_error_status():
    """Example fulfillment with an error response"""
    data = request.json
    dbg('called')
    dbg(data)
    response = {
        'status': 'error',
        'interaction': None,
        'status_reason': 'Fulfillment failed'
    }
    return jsonr(response)


if __name__ == "__main__":
    if app.config.get('DEBUG', False) and app.config.get('PROFILE', False):
        from werkzeug.contrib.profiler import ProfilerMiddleware
        warn('Using Profiler')
        f = open('/tmp/chatbot_profiler.log', 'w')
        app.wsgi_app = ProfilerMiddleware(app.wsgi_app,
                                          stream=f,
                                          restrictions=[20])
    app.run(port=9000)
コード例 #8
0
ファイル: runserver.py プロジェクト: edwinmillan/Chatbot
from chatbot import app
app.run(host='0.0.0.0', debug=True)