Download CHRIS.py from dmsaylor/CHRIS: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/spaces/dmsaylor/CHRIS/resolve/main/CHRIS.py
- Command line
-
hf download hf://spaces/dmsaylor/CHRIS/CHRIS.py
-
curl -L -o CHRIS.py https://huggingface.co/spaces/dmsaylor/CHRIS/resolve/main/CHRIS.py
1.14 kB
| from flask import Flask, render_template | |
| from werkzeug.middleware.profiler import ProfilerMiddleware | |
| app = Flask(__name__) | |
| app.debug = True | |
| # Profile every request (or limit with restrictions) | |
| #app.wsgi_app = ProfilerMiddleware( | |
| # app.wsgi_app, | |
| # restrictions=[30], # show top 30 lines | |
| # sort_by=("tottime",) # total time spent in function body | |
| #) | |
| from efficiency_module import blueprint | |
| app.register_blueprint(blueprint) | |
| from color2_module import blueprint | |
| app.register_blueprint(blueprint) | |
| from color3_module import blueprint | |
| app.register_blueprint(blueprint) | |
| from exposure2_module import blueprint | |
| app.register_blueprint(blueprint) | |
| from exposure3_module import blueprint | |
| app.register_blueprint(blueprint) | |
| from quantity_module import blueprint | |
| app.register_blueprint(blueprint) | |
| def app_init(): | |
| return render_template( | |
| "main.html", | |
| tool_title="CHRIS: CHemical RISk calculators", | |
| nav_links=[ | |
| ], | |
| footer_text="Office of Science and Engineering Laboratories · ", | |
| contact_email="david.saylor@fda.hhs.gov", | |
| ) | |
| if __name__ == '__main__': | |
| app.run(port=8000) | |