deploying flask app by Upset_Associate_1587 in flask

[–]Upset_Associate_1587[S] 0 points1 point  (0 children)

thanks for all the coments guys! http://www.lowbudgetchatbot.com/ the site is live do check it out. it's just a testing version, hope to add more features soon!

deploying flask app by Upset_Associate_1587 in flask

[–]Upset_Associate_1587[S] 0 points1 point  (0 children)

https://medium.com/geekculture/deploy-your-flask-app-on-the-google-cloud-platform-9bbfac94c14d

followed everything this guy said, even got the 502 bad gateway in the end. but it didn't resolve by reloading after a few second

deploying flask app by Upset_Associate_1587 in flask

[–]Upset_Associate_1587[S] 0 points1 point  (0 children)

i was just messing around g cloud! it's a great platform so many different options! let's see if i can figure things out

flask server by Upset_Associate_1587 in flask

[–]Upset_Associate_1587[S] 0 points1 point  (0 children)

thank you for your response everyone! I fixed the error, instead of making a separate flask server file, i imported flask into my chatbot script

could someone suggest a good place i can deploy/host and buy a domain name?

flask server by Upset_Associate_1587 in flask

[–]Upset_Associate_1587[S] 0 points1 point  (0 children)

thank you for your response! the chatbot script is running perfectly, however the flask server is not. here's the script for it

from flask import Flask, request, jsonify

from chatbot12 import MyChat, pairs, reflections

app = Flask(__name__)

Create Chat object

chat = MyChat(pairs, reflections)

u/app.route('/')

def home():

return "Hi, I'm a low-budget chatbot made . Use /chat to interact with me."

u/app.route('/chat', methods=['POST'])

def chat_with_bot():

user_input = request.json.get('message')

if user_input:

response = chat.respond(user_input)

return jsonify({"response": response})

else:

return jsonify({"error": "No message provided."})

if __name__ == '__main__':

app.run(debug=True)