Spaces:
Running
Running
from flask import Flask, request, jsonify | |
from flask_cors import CORS | |
app = Flask(__name__) | |
CORS(app, resources={r"/*": {"origins": "*"}}) | |
# Static reply for testing | |
def get_response(): | |
# Get the message from the frontend (though we're ignoring it) | |
data = request.get_json() | |
message = data.get("message") # You can use this if you want to log the message or process it | |
# Static response message | |
response = {"response": "This is a static reply for testing."} | |
return jsonify(response) | |
if __name__ == "__main__": | |
app.run(host="0.0.0.0", port=7860, debug=True) | |