Spaces:
Sleeping
Sleeping
更新段落
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def call_openai_api(openaiobj,transcription):
|
|
32 |
messages=[
|
33 |
{
|
34 |
"role": "system",
|
35 |
-
"content": "
|
36 |
},
|
37 |
{
|
38 |
"role": "user",
|
@@ -86,11 +86,12 @@ def process_chunks(openaikeystr,inputtext):
|
|
86 |
#openaikey.set_key(openaikeystr)
|
87 |
#print('process_chunk',openaikey.get_key())
|
88 |
chunks = split_into_chunks(text)
|
89 |
-
response='
|
90 |
i=1
|
91 |
for chunk in chunks:
|
|
|
|
|
92 |
i=i+1
|
93 |
-
response=response+call_openai_api(openaiobj,chunk)+'\n 第' +str(i)+'段\n'
|
94 |
# response=response+call_openai_summary(openaiobj,chunk)
|
95 |
|
96 |
#finalresponse=response+' summary \n\n' +call_openai_api(openaiobj,response)
|
|
|
32 |
messages=[
|
33 |
{
|
34 |
"role": "system",
|
35 |
+
"content": "你是專業的會議紀錄製作員,請根據由語音辨識軟體將會議錄音所轉錄的逐字稿,也請注意逐字稿可能有錯,討論內容細節請略過,請列出會議決議,並要用比較正式及容易閱讀的寫法,避免口語化"
|
36 |
},
|
37 |
{
|
38 |
"role": "user",
|
|
|
86 |
#openaikey.set_key(openaikeystr)
|
87 |
#print('process_chunk',openaikey.get_key())
|
88 |
chunks = split_into_chunks(text)
|
89 |
+
response=''
|
90 |
i=1
|
91 |
for chunk in chunks:
|
92 |
+
|
93 |
+
response='第' +str(i)+'段\n'+response+call_openai_api(openaiobj,chunk)+'\n\n'
|
94 |
i=i+1
|
|
|
95 |
# response=response+call_openai_summary(openaiobj,chunk)
|
96 |
|
97 |
#finalresponse=response+' summary \n\n' +call_openai_api(openaiobj,response)
|