Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
-
from flask import Flask, render_template
|
| 2 |
|
| 3 |
-
app = Flask(__name__, static_url_path='/static')
|
| 4 |
|
| 5 |
@app.route('/')
|
| 6 |
-
def
|
| 7 |
-
return render_template('
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
if __name__ == '__main__':
|
| 10 |
-
app.run(
|
|
|
|
| 1 |
+
from flask import Flask, render_template, send_from_directory
|
| 2 |
|
| 3 |
+
app = Flask(__name__, static_url_path='/static', static_folder='static')
|
| 4 |
|
| 5 |
@app.route('/')
|
| 6 |
+
def index():
|
| 7 |
+
return render_template('index.html')
|
| 8 |
+
|
| 9 |
+
@app.route('/models/<path:filename>')
|
| 10 |
+
def serve_model(filename):
|
| 11 |
+
return send_from_directory('static/models', filename)
|
| 12 |
|
| 13 |
if __name__ == '__main__':
|
| 14 |
+
app.run(host='0.0.0.0', port=7860) # 👈 Important: use port 7860
|