Spaces:
Sleeping
Sleeping
Download src/flask_app.py from Figea/bokeh_dynamic_plots: direct link, hf CLI and curl.
- Browser
- Download file 733 Bytes
-
https://huggingface.co/spaces/Figea/bokeh_dynamic_plots/resolve/main/src/flask_app.py
- Command line
-
hf download hf://spaces/Figea/bokeh_dynamic_plots/src/flask_app.py
-
curl -L -o flask_app.py https://huggingface.co/spaces/Figea/bokeh_dynamic_plots/resolve/main/src/flask_app.py
733 Bytes
| ''' | |
| Main module to run the Flask application. | |
| ''' | |
| from bokeh.embed import components | |
| from flask import Flask, render_template, request, jsonify | |
| from scripts.plot import bokeh_general_layout | |
| app = Flask(__name__) | |
| def index(): | |
| script, div = components(bokeh_general_layout) | |
| return render_template('index.html', script=script, div=div) | |
| def ebay_account_deletion(): | |
| data = request.json # eBay peut envoyer des données JSON | |
| print("Received eBay deletion request:", data) # juste pour debug | |
| return jsonify({"status": "ok"}), 200 # renvoie 200 OK comme attendu | |
| if __name__ == "__main__": | |
| app.run(host="0.0.0.0", port=7860, debug=True) | |