Spaces:
Runtime error
Runtime error
| from flask import Flask, render_template, request, jsonify | |
| from chat import chatbot | |
| app = Flask(__name__) | |
| def home(): | |
| return "Smart Chatbot API is running!" | |
| def ask(): | |
| message = str(request.form['messageText']) | |
| bot_response = chatbot(message) | |
| return jsonify({'status':'OK','answer': bot_response}) | |
| if __name__ == "__main__": | |
| app.run(host="0.0.0.0", port=7860) | |