test chatbot
Browse files- app.py +7 -5
- chatbot/chat_main.py +2 -2
app.py
CHANGED
|
@@ -1681,9 +1681,10 @@ def create_chat_panel():
|
|
| 1681 |
|
| 1682 |
# 聊天区域
|
| 1683 |
# 一行代码嵌入!
|
| 1684 |
-
chat_component = create_financial_chatbot()
|
| 1685 |
-
chat_component.render()
|
| 1686 |
-
|
|
|
|
| 1687 |
# chatbot = gr.Chatbot(
|
| 1688 |
# value=[
|
| 1689 |
# {"role": "assistant", "content": "I'm your financial assistant, how can I help you today?"},
|
|
@@ -1904,9 +1905,10 @@ def main():
|
|
| 1904 |
)
|
| 1905 |
# with gr.TabItem("Comparison", elem_classes=["tab-item"]):
|
| 1906 |
# create_tab_content("comparison")
|
| 1907 |
-
with gr.Column(scale=2):
|
| 1908 |
# 聊天面板
|
| 1909 |
-
|
|
|
|
| 1910 |
|
| 1911 |
# 在页面加载时自动刷新公司列表,确保显示最新的数据
|
| 1912 |
demo.load(
|
|
|
|
| 1681 |
|
| 1682 |
# 聊天区域
|
| 1683 |
# 一行代码嵌入!
|
| 1684 |
+
# chat_component = create_financial_chatbot()
|
| 1685 |
+
# chat_component.render()
|
| 1686 |
+
# create_financial_chatbot()
|
| 1687 |
+
# gr.LoginButton()
|
| 1688 |
# chatbot = gr.Chatbot(
|
| 1689 |
# value=[
|
| 1690 |
# {"role": "assistant", "content": "I'm your financial assistant, how can I help you today?"},
|
|
|
|
| 1905 |
)
|
| 1906 |
# with gr.TabItem("Comparison", elem_classes=["tab-item"]):
|
| 1907 |
# create_tab_content("comparison")
|
| 1908 |
+
with gr.Column(scale=2, min_width=400):
|
| 1909 |
# 聊天面板
|
| 1910 |
+
create_financial_chatbot()
|
| 1911 |
+
gr.LoginButton()
|
| 1912 |
|
| 1913 |
# 在页面加载时自动刷新公司列表,确保显示最新的数据
|
| 1914 |
demo.load(
|
chatbot/chat_main.py
CHANGED
|
@@ -2108,7 +2108,7 @@ def create_financial_chatbot():
|
|
| 2108 |
"""
|
| 2109 |
chatbot = gr.ChatInterface(
|
| 2110 |
fn=respond,
|
| 2111 |
-
title="Easy Financial
|
| 2112 |
additional_inputs=[
|
| 2113 |
gr.Textbox(
|
| 2114 |
value="You are a financial analysis assistant. Provide concise investment insights from company financial reports.",
|
|
@@ -2130,4 +2130,4 @@ def create_financial_chatbot():
|
|
| 2130 |
.gradio-container { font-family: 'Segoe UI', sans-serif; }
|
| 2131 |
"""
|
| 2132 |
)
|
| 2133 |
-
|
|
|
|
| 2108 |
"""
|
| 2109 |
chatbot = gr.ChatInterface(
|
| 2110 |
fn=respond,
|
| 2111 |
+
title="Easy Financial Report1",
|
| 2112 |
additional_inputs=[
|
| 2113 |
gr.Textbox(
|
| 2114 |
value="You are a financial analysis assistant. Provide concise investment insights from company financial reports.",
|
|
|
|
| 2130 |
.gradio-container { font-family: 'Segoe UI', sans-serif; }
|
| 2131 |
"""
|
| 2132 |
)
|
| 2133 |
+
chat.render()
|