adamtobegreat commited on
Commit
084635c
·
verified ·
1 Parent(s): a31792e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -213,13 +213,23 @@ with gr.Blocks(
213
  }
214
  #chat-row {
215
  align-items: center !important;
216
- gap: 8px !important;
217
  }
218
  #send-btn {
219
  height: 48px !important;
220
  font-size: 16px !important;
221
  border-radius: 10px !important;
222
  }
 
 
 
 
 
 
 
 
 
 
223
  """
224
  ) as demo:
225
  if logo_base64:
@@ -248,9 +258,10 @@ with gr.Blocks(
248
  show_label=False,
249
  lines=1,
250
  max_lines=1,
251
- elem_id="chat-input"
 
252
  )
253
- send_btn = gr.Button("送出", variant="primary", elem_id="send-btn")
254
 
255
  # === 輸入邏輯 ===
256
  def handle_input(message, history):
 
213
  }
214
  #chat-row {
215
  align-items: center !important;
216
+ gap: 4px !important;
217
  }
218
  #send-btn {
219
  height: 48px !important;
220
  font-size: 16px !important;
221
  border-radius: 10px !important;
222
  }
223
+
224
+ /* ✅ 桌機版比例:輸入框 8、按鈕 2 */
225
+ #chat-row > .gr-textbox { flex: 8 !important; }
226
+ #chat-row > .gr-button { flex: 2 !important; }
227
+
228
+ /* ✅ 手機版比例:輸入框 9、按鈕 1 */
229
+ @media (max-width: 768px) {
230
+ #chat-row > .gr-textbox { flex: 9 !important; }
231
+ #chat-row > .gr-button { flex: 1 !important; }
232
+ }
233
  """
234
  ) as demo:
235
  if logo_base64:
 
258
  show_label=False,
259
  lines=1,
260
  max_lines=1,
261
+ elem_id="chat-input",
262
+ scale=9
263
  )
264
+ send_btn = gr.Button("送出", variant="primary", elem_id="send-btn",scale=1 )
265
 
266
  # === 輸入邏輯 ===
267
  def handle_input(message, history):