zxciop commited on
Commit
e77ec91
·
verified ·
1 Parent(s): 929bb61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
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 home():
7
- return render_template('/templates/index.html')
 
 
 
 
8
 
9
  if __name__ == '__main__':
10
- app.run(debug=True)
 
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