Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import openai
|
|
5 |
from openai.error import RateLimitError
|
6 |
|
7 |
|
8 |
-
openai.api_key = "
|
9 |
prompt = """
|
10 |
我需要你帮助我完成会议记录的总结和梳理。我会给你提供一长段会议记录,其中包含多个参会者的对话记录。你需要完成如下的任务:
|
11 |
1. 提取出会议主要讨论的几个主题或者要点。
|
@@ -76,14 +76,20 @@ with gr.Blocks(theme=gr.themes.Default(text_size='lg', radius_size='sm')) as dem
|
|
76 |
upload_btn = gr.Button(value="上传")
|
77 |
|
78 |
with gr.Row():
|
79 |
-
with gr.
|
80 |
-
#
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
#
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
with gr.Column():
|
88 |
# 对话交互
|
89 |
chatbot = gr.Chatbot(label="对话内容").style(height=400)
|
|
|
5 |
from openai.error import RateLimitError
|
6 |
|
7 |
|
8 |
+
openai.api_key = ""
|
9 |
prompt = """
|
10 |
我需要你帮助我完成会议记录的总结和梳理。我会给你提供一长段会议记录,其中包含多个参会者的对话记录。你需要完成如下的任务:
|
11 |
1. 提取出会议主要讨论的几个主题或者要点。
|
|
|
76 |
upload_btn = gr.Button(value="上传")
|
77 |
|
78 |
with gr.Row():
|
79 |
+
with gr.Column():
|
80 |
+
# api key
|
81 |
+
api_input = gr.Textbox(label="API Key", placeholder="请输入API Key", type="password")
|
82 |
+
api_btn = gr.Button(value="设置")
|
83 |
+
api_btn.click(fn=set_api_key, inputs=api_input, outputs=None)
|
84 |
+
# 文字展示
|
85 |
+
with gr.Tab("原文"):
|
86 |
+
# 原文
|
87 |
+
content_box = gr.Textbox(label="文稿内容")
|
88 |
+
download_btn = gr.Button(value="下载")
|
89 |
+
with gr.Tab("总结"):
|
90 |
+
# 总结
|
91 |
+
summary_box = gr.Textbox(label="总结内容")
|
92 |
+
download_btn = gr.Button(value="下载")
|
93 |
with gr.Column():
|
94 |
# 对话交互
|
95 |
chatbot = gr.Chatbot(label="对话内容").style(height=400)
|