m-newhauser commited on
Commit
07e60da
·
verified ·
1 Parent(s): 627d03f

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -33,7 +33,11 @@ def index():
33
 
34
  @app.route("/<path:name>")
35
  def static_file(name):
36
- if name in ("brand.css", "strip.js", "favicon.svg", "og-card.png", "brand-tile.png"):
 
 
 
 
37
  return send_from_directory(STATIC, name)
38
  return ("not found", 404)
39
 
 
33
 
34
  @app.route("/<path:name>")
35
  def static_file(name):
36
+ # Shared chrome + demo assets. Anything in static/assets/ is served; keep
37
+ # user-added images there to avoid editing this whitelist.
38
+ if name in ("brand.css", "strip.js", "favicon.svg", "og-card.png"):
39
+ return send_from_directory(STATIC, name)
40
+ if name.startswith("assets/"):
41
  return send_from_directory(STATIC, name)
42
  return ("not found", 404)
43