Yaswanth56 commited on
Commit
c32c1af
·
verified ·
1 Parent(s): 74f24b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -1,18 +1,14 @@
1
  from flask import Flask, render_template, send_from_directory
2
 
3
- app = Flask(__name__)
4
 
5
  @app.route('/')
6
  def index():
7
  return render_template('index.html')
8
 
9
- @app.route('/styles.css')
10
- def styles():
11
- return send_from_directory('static', 'styles.css')
12
-
13
- @app.route('/script.js')
14
- def script():
15
- return send_from_directory('static', 'script.js')
16
 
17
  if __name__ == '__main__':
18
  app.run(debug=True, host='0.0.0.0', port=7860)
 
1
  from flask import Flask, render_template, send_from_directory
2
 
3
+ app = Flask(__name__, template_folder='templates', static_folder='static')
4
 
5
  @app.route('/')
6
  def index():
7
  return render_template('index.html')
8
 
9
+ @app.route('/static/<path:filename>')
10
+ def serve_static(filename):
11
+ return send_from_directory('static', filename)
 
 
 
 
12
 
13
  if __name__ == '__main__':
14
  app.run(debug=True, host='0.0.0.0', port=7860)