Spaces:
Sleeping
Sleeping
| 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) |