CoCoOne commited on
Commit
7d0f51c
·
verified ·
1 Parent(s): 8e11548

Refine submit space layout and remove Gradio 6 Blocks warning

Browse files
Files changed (1) hide show
  1. app.py +17 -10
app.py CHANGED
@@ -64,9 +64,9 @@ textarea {
64
  }
65
 
66
  .gradio-container {
67
- max-width: 1220px !important;
68
  margin: 0 auto !important;
69
- padding: 34px 28px 56px !important;
70
  --block-background-fill: transparent;
71
  --block-border-width: 0px;
72
  --block-border-color: transparent;
@@ -81,7 +81,7 @@ textarea {
81
 
82
  .page-shell {
83
  margin-top: 26px;
84
- padding: 30px 34px 34px;
85
  background: #ffffff;
86
  border: 1px solid rgba(15, 23, 42, 0.08);
87
  border-radius: 22px;
@@ -89,7 +89,7 @@ textarea {
89
  }
90
 
91
  .hero {
92
- padding: 38px 42px 34px;
93
  border-radius: 24px;
94
  color: #f8fbff;
95
  background:
@@ -140,7 +140,8 @@ textarea {
140
  }
141
 
142
  .section-row {
143
- margin-top: 30px;
 
144
  }
145
 
146
  .section-row,
@@ -200,11 +201,11 @@ textarea {
200
  }
201
 
202
  .main-form {
203
- padding-right: 14px;
204
  }
205
 
206
  .side-notes {
207
- padding-left: 10px;
208
  }
209
 
210
  .caption {
@@ -341,11 +342,15 @@ textarea {
341
 
342
  @media (max-width: 900px) {
343
  .gradio-container {
344
- padding: 22px 16px 42px !important;
 
 
 
 
345
  }
346
 
347
  .hero {
348
- padding: 28px 24px 26px;
349
  border-radius: 20px;
350
  }
351
 
@@ -550,7 +555,7 @@ def create_pr(state: dict | None):
550
  cleanup_work_dir(prepared.work_dir)
551
 
552
 
553
- with gr.Blocks(title=SPACE_TITLE, theme=gr.themes.Base(), css=CSS, fill_width=True) as demo:
554
  state = gr.State(None)
555
  archive_state = gr.State('')
556
 
@@ -659,6 +664,8 @@ with gr.Blocks(title=SPACE_TITLE, theme=gr.themes.Base(), css=CSS, fill_width=Tr
659
 
660
  if __name__ == '__main__':
661
  demo.launch(
 
 
662
  server_name=os.environ.get('GRADIO_SERVER_NAME', '0.0.0.0'),
663
  server_port=int(os.environ.get('GRADIO_SERVER_PORT', os.environ.get('PORT', '7860'))),
664
  )
 
64
  }
65
 
66
  .gradio-container {
67
+ max-width: 1280px !important;
68
  margin: 0 auto !important;
69
+ padding: 40px 40px 64px !important;
70
  --block-background-fill: transparent;
71
  --block-border-width: 0px;
72
  --block-border-color: transparent;
 
81
 
82
  .page-shell {
83
  margin-top: 26px;
84
+ padding: 36px 48px 42px;
85
  background: #ffffff;
86
  border: 1px solid rgba(15, 23, 42, 0.08);
87
  border-radius: 22px;
 
89
  }
90
 
91
  .hero {
92
+ padding: 42px 48px 36px;
93
  border-radius: 24px;
94
  color: #f8fbff;
95
  background:
 
140
  }
141
 
142
  .section-row {
143
+ margin-top: 34px;
144
+ gap: 30px;
145
  }
146
 
147
  .section-row,
 
201
  }
202
 
203
  .main-form {
204
+ padding-right: 18px;
205
  }
206
 
207
  .side-notes {
208
+ padding-left: 18px;
209
  }
210
 
211
  .caption {
 
342
 
343
  @media (max-width: 900px) {
344
  .gradio-container {
345
+ padding: 22px 18px 42px !important;
346
+ }
347
+
348
+ .page-shell {
349
+ padding: 26px 22px 30px;
350
  }
351
 
352
  .hero {
353
+ padding: 30px 24px 26px;
354
  border-radius: 20px;
355
  }
356
 
 
555
  cleanup_work_dir(prepared.work_dir)
556
 
557
 
558
+ with gr.Blocks(title=SPACE_TITLE, fill_width=True) as demo:
559
  state = gr.State(None)
560
  archive_state = gr.State('')
561
 
 
664
 
665
  if __name__ == '__main__':
666
  demo.launch(
667
+ theme=gr.themes.Base(),
668
+ css=CSS,
669
  server_name=os.environ.get('GRADIO_SERVER_NAME', '0.0.0.0'),
670
  server_port=int(os.environ.get('GRADIO_SERVER_PORT', os.environ.get('PORT', '7860'))),
671
  )