ruv commited on
Commit
3f23e4b
·
verified ·
1 Parent(s): 26e5b23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -16,6 +16,14 @@ def get_data():
16
  ]
17
  }
18
  return jsonify(data)
19
-
 
 
 
 
 
 
 
 
20
  if __name__ == "__main__":
21
  app.run(host="0.0.0.0", port=7860)
 
16
  ]
17
  }
18
  return jsonify(data)
19
+
20
+ @app.route('/', defaults={'path': ''})
21
+ @app.route('/<path:path>')
22
+ def serve(path):
23
+ if path != "" and os.path.exists(app.static_folder + '/' + path):
24
+ return send_from_directory(app.static_folder, path)
25
+ else:
26
+ return send_from_directory(app.static_folder, 'index.html')
27
+
28
  if __name__ == "__main__":
29
  app.run(host="0.0.0.0", port=7860)