hugforziio commited on
Commit
f4e76cf
·
1 Parent(s): 05da51e

Update app_cn.py

Browse files
Files changed (1) hide show
  1. app_cn.py +17 -16
app_cn.py CHANGED
@@ -129,22 +129,23 @@ with gradio.Blocks(title="ChatGPT 批处理", css=css) as demo:
129
  # 中止执行按钮
130
  stop_btn = gradio.Button(value='中止!')
131
 
132
- # with gradio.Accordion("下载聊天记录", open=False):
133
- # make_file_btn = gradio.Button(value='生成文件')
134
- # with gradio.Row(visible=False) as file_row:
135
- # # 下载区域(json文件)
136
- # history_file_json = gradio.File(label='Json 下载', interactive=False)
137
- # # 下载区域(md文件)
138
- # history_file_md = gradio.File(label='Markdown 下载', interactive=False)
139
- # pass
140
- # pass
141
-
142
-
143
- # make_file_btn.click(
144
- # fn=make_history_file_fn,
145
- # inputs=[history],
146
- # outputs=[history_file_json, history_file_md, file_row],
147
- # )
 
148
 
149
 
150
  start_event = start_btn.click(
 
129
  # 中止执行按钮
130
  stop_btn = gradio.Button(value='中止!')
131
 
132
+ with gradio.Accordion("下载聊天记录", open=False):
133
+ gradio.Markdown("(暂时无法下载,可能是 Hugging Face 的限制,之后更新)")
134
+ make_file_btn = gradio.Button(value='生成文件')
135
+ with gradio.Row(visible=False) as file_row:
136
+ # 下载区域(json文件)
137
+ history_file_json = gradio.File(label='Json 下载', interactive=False)
138
+ # 下载区域(md文件)
139
+ history_file_md = gradio.File(label='Markdown 下载', interactive=False)
140
+ pass
141
+ pass
142
+
143
+
144
+ make_file_btn.click(
145
+ fn=make_history_file_fn,
146
+ inputs=[history],
147
+ outputs=[history_file_json, history_file_md, file_row],
148
+ )
149
 
150
 
151
  start_event = start_btn.click(