betterwithage commited on
Commit
2c16be5
·
1 Parent(s): b595e0a

fix(runtime): make Gradio assets portable (#7)

Browse files

- fix(runtime): make Gradio assets portable (9f2599517573f6386beec20ac8ad8f676c7ebec2)

Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -39,6 +39,8 @@ CSS = """
39
  --forge-amber: #f2c572;
40
  }
41
  .gradio-container {
 
 
42
  max-width: 1380px !important;
43
  margin: 0 auto !important;
44
  background:
@@ -47,6 +49,13 @@ CSS = """
47
  #071011 !important;
48
  color: var(--forge-ink) !important;
49
  }
 
 
 
 
 
 
 
50
  .forge-hero {
51
  border: 1px solid var(--forge-line);
52
  border-radius: 22px;
@@ -391,6 +400,10 @@ if __name__ == "__main__":
391
  server_name="0.0.0.0",
392
  server_port=int(os.environ.get("PORT", "7860")),
393
  show_error=False,
 
 
 
 
394
  css=CSS,
395
  theme=gr.themes.Base(),
396
  )
 
39
  --forge-amber: #f2c572;
40
  }
41
  .gradio-container {
42
+ width: 100% !important;
43
+ min-width: 0 !important;
44
  max-width: 1380px !important;
45
  margin: 0 auto !important;
46
  background:
 
49
  #071011 !important;
50
  color: var(--forge-ink) !important;
51
  }
52
+ .gradio-container > .main,
53
+ .gradio-container .wrap,
54
+ .gradio-container main.contain {
55
+ width: 100% !important;
56
+ min-width: 0 !important;
57
+ max-width: 100% !important;
58
+ }
59
  .forge-hero {
60
  border: 1px solid var(--forge-line);
61
  border-radius: 22px;
 
400
  server_name="0.0.0.0",
401
  server_port=int(os.environ.get("PORT", "7860")),
402
  show_error=False,
403
+ # The managed SSR shell only packages Brotli variants for its /_app CSS.
404
+ # Use Gradio's client shell so assets remain reachable without relying on
405
+ # proxy content-encoding negotiation.
406
+ ssr_mode=False,
407
  css=CSS,
408
  theme=gr.themes.Base(),
409
  )