youngtsai commited on
Commit
3dae297
·
1 Parent(s): f4819db

readonly=True, label="對話 JSON 內容", lines=10

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -118,7 +118,7 @@ def main_function(password: str, theme: str, language: str, method: str, rounds:
118
  with open(file_name, "w", encoding="utf-8") as f:
119
  f.write(json_output)
120
 
121
- return chatbot_dialogue, file_name
122
 
123
 
124
  if __name__ == "__main__":
@@ -137,6 +137,7 @@ if __name__ == "__main__":
137
  ],
138
  [
139
  gr.components.Chatbot(label="生成的對話"),
140
- gr.components.File(label="下載對話 JSON 文件")
 
141
  ]
142
  ).launch()
 
118
  with open(file_name, "w", encoding="utf-8") as f:
119
  f.write(json_output)
120
 
121
+ return chatbot_dialogue, file_name, json_output
122
 
123
 
124
  if __name__ == "__main__":
 
137
  ],
138
  [
139
  gr.components.Chatbot(label="生成的對話"),
140
+ gr.components.File(label="下載對話 JSON 文件"),
141
+ gr.components.Textbox(readonly=True, label="對話 JSON 內容", lines=10)
142
  ]
143
  ).launch()