Keldos commited on
Commit
679aef4
1 Parent(s): 762e19e

WIP: Lora model select in header

Browse files
ChuanhuChatbot.py CHANGED
@@ -103,7 +103,8 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
103
  show_label=False, container=False, elem_id="model-select-dropdown"
104
  )
105
  lora_select_dropdown = gr.Dropdown(
106
- label=i18n("选择LoRA模型"), choices=[], multiselect=False, interactive=True, visible=False
 
107
  )
108
  gr.HTML(get_html("chatbot_header_btn.html"),elem_id="chatbot-header-btn-bar")
109
  with gr.Row():
 
103
  show_label=False, container=False, elem_id="model-select-dropdown"
104
  )
105
  lora_select_dropdown = gr.Dropdown(
106
+ label=i18n("选择LoRA模型"), choices=[], multiselect=False, interactive=True, visible=False,
107
+ container=False,
108
  )
109
  gr.HTML(get_html("chatbot_header_btn.html"),elem_id="chatbot-header-btn-bar")
110
  with gr.Row():
web_assets/stylesheet/ChuanhuChat.css CHANGED
@@ -255,20 +255,37 @@ body.popup-open {
255
  backdrop-filter: blur(24px);
256
  -webkit-backdrop-filter: blur(24px);
257
  }
258
- #model-select-dropdown {
259
- max-width: 0;
260
  background: none;
261
  }
262
- #model-select-dropdown > label > .wrap {
 
 
 
 
 
 
 
263
  background: none;
 
 
 
 
264
  }
 
 
 
 
 
 
 
265
  #chatbot-header-btn-bar {
266
  justify-content: flex-end;
267
  display: flex;
268
  }
269
  /* default invisible */
270
  #menu-area, #toolbox-area {
271
- height: 0;
272
  width: 0;
273
  transition: width 0.3s ease;
274
  visibility: hidden;
 
255
  backdrop-filter: blur(24px);
256
  -webkit-backdrop-filter: blur(24px);
257
  }
258
+ #chatbot-header .gradio-dropdown {
259
+ max-width: 14em;
260
  background: none;
261
  }
262
+ #chatbot-header .gradio-dropdown > label {
263
+ display: flex;
264
+ }
265
+ #chatbot-header .gradio-dropdown > label > span[data-testid="block-info"] {
266
+ height: unset;
267
+ overflow: visible;
268
+ top: 0;
269
+ align-self: center;
270
  background: none;
271
+ margin: 0;
272
+ padding: 0;
273
+ position: relative;
274
+ width: auto;
275
  }
276
+ #chatbot-header .gradio-dropdown > label > .wrap {
277
+ background: none;
278
+ }
279
+ #model-select-dropdown > label > span[data-testid="block-info"] {
280
+ display: none;
281
+ }
282
+
283
  #chatbot-header-btn-bar {
284
  justify-content: flex-end;
285
  display: flex;
286
  }
287
  /* default invisible */
288
  #menu-area, #toolbox-area {
 
289
  width: 0;
290
  transition: width 0.3s ease;
291
  visibility: hidden;