cwadayi commited on
Commit
3d6667d
·
verified ·
1 Parent(s): b30bb82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -22,7 +22,7 @@ with gr.Blocks(
22
  }
23
  """
24
  ) as app:
25
- # 先建立 ChatInterface(使用內建 textbox 與按鈕列)
26
  chat = gr.ChatInterface(
27
  fn=process_user_request,
28
  chatbot=gr.Chatbot(
@@ -32,10 +32,7 @@ with gr.Blocks(
32
  scale=1
33
  ),
34
  type="messages",
35
- submit_btn="Send",
36
- retry_btn="Retry",
37
- undo_btn="Undo",
38
- clear_btn="Clear",
39
  examples=[
40
  ["#news Open-source LLM trends [條列] depth:2"],
41
  ["#papers P-wave picking with AI [表格]"],
@@ -49,7 +46,7 @@ with gr.Blocks(
49
  concurrency_limit=5,
50
  )
51
 
52
- # 側欄:說明 + 一鍵示例(直接填 chat.textbox,所以保留預設按鈕)
53
  with gr.Sidebar():
54
  gr.HTML(DESCRIPTION)
55
  gr.Markdown("### ⚡ 一鍵範例")
 
22
  }
23
  """
24
  ) as app:
25
+ # ChatInterface 使用舊版支援的參數
26
  chat = gr.ChatInterface(
27
  fn=process_user_request,
28
  chatbot=gr.Chatbot(
 
32
  scale=1
33
  ),
34
  type="messages",
35
+ submit_btn="Send", # 舊版只支援 submit_btn
 
 
 
36
  examples=[
37
  ["#news Open-source LLM trends [條列] depth:2"],
38
  ["#papers P-wave picking with AI [表格]"],
 
46
  concurrency_limit=5,
47
  )
48
 
49
+ # 側欄:說明 + 一鍵示例
50
  with gr.Sidebar():
51
  gr.HTML(DESCRIPTION)
52
  gr.Markdown("### ⚡ 一鍵範例")