youngtsai commited on
Commit
f4b741f
1 Parent(s): 30e87ad

return respond(button, df_string_output, chat_history)

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ def process_file(file):
14
  df = pd.read_csv(file)
15
  else:
16
  df = pd.read_excel(file)
17
-
18
  df_string = df.to_string()
19
 
20
  # 根据上传的文件内容生成问题
@@ -83,7 +83,7 @@ def respond(user_message, df_string_output, chat_history):
83
 
84
  def on_button_click(button, df_string_output, chat_history):
85
  # 当按钮被点击时发送对应的问题
86
- return respond(button.text, df_string_output, chat_history)
87
 
88
  with gr.Blocks() as demo:
89
  with gr.Row():
 
14
  df = pd.read_csv(file)
15
  else:
16
  df = pd.read_excel(file)
17
+
18
  df_string = df.to_string()
19
 
20
  # 根据上传的文件内容生成问题
 
83
 
84
  def on_button_click(button, df_string_output, chat_history):
85
  # 当按钮被点击时发送对应的问题
86
+ return respond(button, df_string_output, chat_history)
87
 
88
  with gr.Blocks() as demo:
89
  with gr.Row():