JC321 commited on
Commit
50f062a
·
verified ·
1 Parent(s): eab3e15

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -66,7 +66,7 @@ def truncate_text(text, max_chars, suffix="...[truncated]"):
66
  return text[:max_chars] + suffix
67
 
68
  def get_system_prompt():
69
- """生成包含当前日期的系统提示词精简版"""
70
  from datetime import datetime
71
  current_date = datetime.now().strftime("%Y-%m-%d")
72
  return f"""Financial analyst. Today: {current_date}. Use tools for company data, stock prices, news. Be concise."""
@@ -370,7 +370,8 @@ with gr.Blocks(title="Financial AI Assistant") as demo:
370
  "Get the latest market news about crypto",
371
  "Compare Microsoft's latest earnings with its current stock price",
372
  ],
373
- chatbot=gr.Chatbot(height=600),
 
374
  )
375
 
376
  # 启动应用
 
66
  return text[:max_chars] + suffix
67
 
68
  def get_system_prompt():
69
+ """生成包含当前日期的系统提示词(精简版)"""
70
  from datetime import datetime
71
  current_date = datetime.now().strftime("%Y-%m-%d")
72
  return f"""Financial analyst. Today: {current_date}. Use tools for company data, stock prices, news. Be concise."""
 
370
  "Get the latest market news about crypto",
371
  "Compare Microsoft's latest earnings with its current stock price",
372
  ],
373
+ chatbot=gr.Chatbot(height=700),
374
+ textbox=gr.Textbox(lines=4, max_lines=4, placeholder="Ask me anything about finance, stocks, or company data..."),
375
  )
376
 
377
  # 启动应用