Spaces:
Runtime error
Runtime error
from flask import Flask, render_template, request, jsonify | |
from chat import get_response | |
app = Flask(__name__) | |
def index_get(): | |
return render_template("base.html") | |
def predict(): | |
text = request.get_json().get("message") | |
response = get_response(text) | |
message = {"answer": response} | |
return jsonify(message) | |
if __name__ == "__main__": | |
app.run(debug=True) |