Spaces:
Sleeping
Sleeping
Download app.py from ministerchief/LS_Technologies: direct link, hf CLI and curl.
- Browser
- Download file 792 Bytes
-
https://huggingface.co/spaces/ministerchief/LS_Technologies/resolve/main/app.py
- Command line
-
hf download hf://spaces/ministerchief/LS_Technologies/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ministerchief/LS_Technologies/resolve/main/app.py
792 Bytes
| import os | |
| from flask import Flask, render_template, request, jsonify | |
| # Gets the absolute path of the directory containing app.py | |
| base_dir = os.path.dirname(os.path.abspath(__file__)) | |
| app = Flask( | |
| __name__, | |
| template_folder=os.path.join(base_dir, 'templates'), | |
| static_folder=os.path.join(base_dir, 'static') | |
| ) | |
| def home(): | |
| return render_template('index.html') | |
| def about(): | |
| return render_template('about.html') | |
| def services(): | |
| return render_template('services.html') | |
| def contact(): | |
| return render_template('contact.html') | |
| import os | |
| if __name__ == "__main__": | |
| port = int(os.environ.get("PORT", 7860)) | |
| app.run(host="0.0.0.0", port=port) |