Wrap rasa with Flask

I was working on the weatherbot tutorial and it is working fine. Now when i want to wrap my dialouge_management_model.py using flask. I want to run this code and when i send response from ui i should get the result but now when i try i am getting error " net::ERR_CONNECTION_REFUSED" .Below is my code please help.

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import logging
import rasa_core
from rasa_core.agent import Agent
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy
from rasa_core.interpreter import RasaNLUInterpreter
from rasa_core.utils import EndpointConfig
from rasa_core.run import serve_application
from rasa_core import config
from rasa_core.channels.console import CmdlineInput
from rasa_core.policies.fallback import FallbackPolicy
from rasa_core.policies.keras_policy import KerasPolicy


from flask import Flask
from flask_cors import CORS, cross_origin


app = Flask(__name__)
CORS(app)

logger = logging.getLogger(__name__)


def train_dialogue(domain_file='\\RASA_nlu\\weather_domain.yml',
                   model_path='\\RASA_nlu\\models\\dialogue',
                   training_data_file='\\RASA_nlu\\data\\stories.md'):
    fallback = FallbackPolicy(fallback_action_name="utter_fallback",core_threshold=0.3,nlu_threshold=0.3)

    agent = Agent(domain_file, policies=[MemoizationPolicy(), KerasPolicy(max_history=3, epochs=200, batch_size=50),fallback])
    data = agent.load_data(training_data_file)

    agent.train(data)

    agent.persist(model_path)
    return agent

@app.route("/conversations/default/respond",methods=['POST'])
def run_weather_bot(serve_forever=True):
    logging.basicConfig(level="ERROR")
    interpreter = RasaNLUInterpreter('\\models\\nlu\\default\\weathernlu')
    action_endpoint = EndpointConfig(url="http://192.xxx.xx.xxx:5005/webhook")
    agent = Agent.load('\\models\\dialogue', interpreter=interpreter, action_endpoint=action_endpoint)

    rasa_core.run.serve_application(agent,channel='cmdline')


    return agent



if __name__ == '__main__':

    app.run("192.xxx.xx.xxx",5005,debug=True)