ใ……ใ…Žใ…‡ commited on
Commit
508b390
ยท
1 Parent(s): 77dedff

fix: set architecture diagram to 150x300px and hide navigation buttons

Browse files
Files changed (1) hide show
  1. CodeWeaver/ui/app.py +26 -17
CodeWeaver/ui/app.py CHANGED
@@ -121,39 +121,44 @@ button[data-testid="submit-button"][aria-label*="Stop"] {
121
  opacity: 0 !important;
122
  }
123
  /* ์•„ํ‚คํ…์ฒ˜ ๋‹ค์ด์–ด๊ทธ๋žจ ์ด๋ฏธ์ง€ ํฌ๊ธฐ ์กฐ์ • */
124
- #architecture_diagram,
125
- #architecture_diagram * {
126
- max-width: 100% !important;
127
- width: 100% !important;
128
  max-height: 300px !important;
129
  overflow: auto !important;
130
  box-sizing: border-box !important;
 
131
  }
132
- #architecture_diagram {
133
- display: flex !important;
134
- justify-content: center !important;
135
- align-items: flex-start !important;
136
- padding: 10px !important;
 
 
 
 
 
137
  }
138
  #architecture_diagram > div {
 
 
 
139
  max-height: 300px !important;
140
  overflow: auto !important;
141
  }
142
  #architecture_diagram img,
143
  #architecture_diagram svg,
144
  #architecture_diagram img[src],
145
- #architecture_diagram svg[src],
146
- #architecture_diagram img[src*=".svg"],
147
- #architecture_diagram svg[src*=".svg"] {
148
- max-width: 100% !important;
149
- width: 100% !important;
150
  height: auto !important;
 
151
  max-height: 300px !important;
152
  object-fit: contain !important;
153
  display: block !important;
154
  margin: 0 auto !important;
155
- transform: scale(0.8) !important;
156
- transform-origin: center top !important;
157
  }
158
  """
159
 
@@ -370,7 +375,11 @@ def create_demo() -> gr.Blocks:
370
  label="์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜",
371
  show_label=False,
372
  container=False,
373
- elem_id="architecture_diagram"
 
 
 
 
374
  )
375
  else:
376
  gr.Markdown("โš ๏ธ ์•„ํ‚คํ…์ฒ˜ ๋‹ค์ด์–ด๊ทธ๋žจ์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.")
 
121
  opacity: 0 !important;
122
  }
123
  /* ์•„ํ‚คํ…์ฒ˜ ๋‹ค์ด์–ด๊ทธ๋žจ ์ด๋ฏธ์ง€ ํฌ๊ธฐ ์กฐ์ • */
124
+ #architecture_diagram {
125
+ width: 150px !important;
126
+ height: 300px !important;
127
+ max-width: 150px !important;
128
  max-height: 300px !important;
129
  overflow: auto !important;
130
  box-sizing: border-box !important;
131
+ margin: 0 auto !important;
132
  }
133
+ /* Gradio Image ์ปดํฌ๋„ŒํŠธ์˜ ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฒ„ํŠผ ์ˆจ๊ธฐ๊ธฐ */
134
+ #architecture_diagram button,
135
+ #architecture_diagram .image-nav,
136
+ #architecture_diagram .nav-button,
137
+ #architecture_diagram [aria-label*="previous"],
138
+ #architecture_diagram [aria-label*="next"],
139
+ #architecture_diagram [aria-label*="Previous"],
140
+ #architecture_diagram [aria-label*="Next"] {
141
+ display: none !important;
142
+ visibility: hidden !important;
143
  }
144
  #architecture_diagram > div {
145
+ width: 150px !important;
146
+ height: 300px !important;
147
+ max-width: 150px !important;
148
  max-height: 300px !important;
149
  overflow: auto !important;
150
  }
151
  #architecture_diagram img,
152
  #architecture_diagram svg,
153
  #architecture_diagram img[src],
154
+ #architecture_diagram svg[src] {
155
+ width: 150px !important;
 
 
 
156
  height: auto !important;
157
+ max-width: 150px !important;
158
  max-height: 300px !important;
159
  object-fit: contain !important;
160
  display: block !important;
161
  margin: 0 auto !important;
 
 
162
  }
163
  """
164
 
 
375
  label="์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜",
376
  show_label=False,
377
  container=False,
378
+ elem_id="architecture_diagram",
379
+ show_download_button=False,
380
+ show_share_button=False,
381
+ height=300,
382
+ width=150
383
  )
384
  else:
385
  gr.Markdown("โš ๏ธ ์•„ํ‚คํ…์ฒ˜ ๋‹ค์ด์–ด๊ทธ๋žจ์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.")