Spaces:
Runtime error
Runtime error
File size: 324 Bytes
35dc49b 596c401 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route('/')
def hello():
name = request.args.get('name', '')
if name:
message = f'Hello, {name}!'
else:
message = 'Hello!'
return jsonify(message=message)
if __name__ == '__main__':
app.run(host="0.0.0.0", port=7860)
|