Exemple #1
0
from chatbot import app

if __name__ == '__main__':
  app.run(debug=True)
Exemple #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)
Exemple #3
0
from chatbot.app import run

run()
Exemple #4
0
from chatbot import app

if __name__ == "__main__":
    app.run()
Exemple #5
0
# gunicorn can't find app when it is not named application
from chatbot import app as application


if __name__ == "__main__":
    application.run()
Exemple #6
0
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)
Exemple #7
0
        '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)
Exemple #8
0
from chatbot import app
app.run(host='0.0.0.0', debug=True)