from flask import Flask, request, redirect
from twilio.twiml.messaging_response import MessagingResponse
from googletrans import Translator

app = Flask(__name__)

@app.route("/sms", methods=["GET", "POST"])
def sms_reply():

    # Get the message recieved
    message = request.form['Body']

    # Translate the message
    translator = Translator()
    translation = translator.translate(message, dest='es')

    # Send the translation back
    resp = MessagingResponse()
    resp.message(translation.text)

    return str(resp)

if __name__ == "__main__":
    app.run(debug="True")
ca7c3f1ba3ef442b3fb37225db3dca47a2db64fc
<mask token>


@app.route('/sms', methods=['GET', 'POST'])
def sms_reply():
    message = request.form['Body']
    translator = Translator()
    translation = translator.translate(message, dest='es')
    resp = MessagingResponse()
    resp.message(translation.text)
    return str(resp)


<mask token>

<mask token>


@app.route('/sms', methods=['GET', 'POST'])
def sms_reply():
    message = request.form['Body']
    translator = Translator()
    translation = translator.translate(message, dest='es')
    resp = MessagingResponse()
    resp.message(translation.text)
    return str(resp)


if __name__ == '__main__':
    app.run(debug='True')

<mask token>
app = Flask(__name__)


@app.route('/sms', methods=['GET', 'POST'])
def sms_reply():
    message = request.form['Body']
    translator = Translator()
    translation = translator.translate(message, dest='es')
    resp = MessagingResponse()
    resp.message(translation.text)
    return str(resp)


if __name__ == '__main__':
    app.run(debug='True')

from flask import Flask, request, redirect
from twilio.twiml.messaging_response import MessagingResponse
from googletrans import Translator
app = Flask(__name__)


@app.route('/sms', methods=['GET', 'POST'])
def sms_reply():
    message = request.form['Body']
    translator = Translator()
    translation = translator.translate(message, dest='es')
    resp = MessagingResponse()
    resp.message(translation.text)
    return str(resp)


if __name__ == '__main__':
    app.run(debug='True')

from flask import Flask, request, redirect
from twilio.twiml.messaging_response import MessagingResponse
from googletrans import Translator

app = Flask(__name__)

@app.route("/sms", methods=["GET", "POST"])
def sms_reply():

    # Get the message recieved
    message = request.form['Body']

    # Translate the message
    translator = Translator()
    translation = translator.translate(message, dest='es')

    # Send the translation back
    resp = MessagingResponse()
    resp.message(translation.text)

    return str(resp)

if __name__ == "__main__":
    app.run(debug="True")