JC321 commited on
Commit
274bec9
·
verified ·
1 Parent(s): 0041e4f

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -279,7 +279,10 @@ def chatbot_response(message, history):
279
  return f"Sorry, I encountered an error: {str(e)}. Please try asking about financial data for specific companies like Apple, Microsoft, NVIDIA, Tesla, etc."
280
 
281
  # 创建 Gradio 界面
282
- with gr.Blocks(title="SEC Financial Data Query Assistant") as demo:
 
 
 
283
  gr.Markdown("# 🤖 SEC Financial Data Query Assistant")
284
  gr.Markdown("Query SEC financial data for US listed companies through MCP Server")
285
 
@@ -295,7 +298,13 @@ with gr.Blocks(title="SEC Financial Data Query Assistant") as demo:
295
  "Get Microsoft's 5-year financial trends",
296
  "How is Tesla performing financially?"
297
  ],
298
- cache_examples=False
 
 
 
 
 
 
299
  )
300
 
301
  with gr.Tab("Direct Query"):
 
279
  return f"Sorry, I encountered an error: {str(e)}. Please try asking about financial data for specific companies like Apple, Microsoft, NVIDIA, Tesla, etc."
280
 
281
  # 创建 Gradio 界面
282
+ with gr.Blocks(title="SEC Financial Data Query Assistant", css="""
283
+ .chatbot {min-height: 600px !important;}
284
+ footer {visibility: hidden}
285
+ """) as demo:
286
  gr.Markdown("# 🤖 SEC Financial Data Query Assistant")
287
  gr.Markdown("Query SEC financial data for US listed companies through MCP Server")
288
 
 
298
  "Get Microsoft's 5-year financial trends",
299
  "How is Tesla performing financially?"
300
  ],
301
+ cache_examples=False,
302
+ chatbot=gr.Chatbot(height=700),
303
+ textbox=gr.Textbox(placeholder="Ask me about any company's financial data...", scale=7),
304
+ submit_btn="Send",
305
+ retry_btn="🔄 Retry",
306
+ undo_btn="⬅️ Undo",
307
+ clear_btn="🗑️ Clear"
308
  )
309
 
310
  with gr.Tab("Direct Query"):