Spaces:
Build error
Build error
add summary procedure
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ def call_openai_summary(openaiobj,transcription):
|
|
| 49 |
messages=[
|
| 50 |
{
|
| 51 |
"role": "system",
|
| 52 |
-
"content": "
|
| 53 |
},
|
| 54 |
{
|
| 55 |
"role": "user",
|
|
@@ -94,8 +94,8 @@ def process_chunks(openaikeystr,inputtext):
|
|
| 94 |
i=i+1
|
| 95 |
# response=response+call_openai_summary(openaiobj,chunk)
|
| 96 |
|
| 97 |
-
|
| 98 |
-
return
|
| 99 |
# # Processes chunks in parallel
|
| 100 |
# with ThreadPoolExecutor() as executor:
|
| 101 |
# responses = list(executor.map(call_openai_api, [openaiobj,chunks]))
|
|
@@ -231,7 +231,7 @@ ainotes = gr.Interface(
|
|
| 231 |
theme="huggingface",
|
| 232 |
title="會議紀錄小幫手AINotes",
|
| 233 |
description=(
|
| 234 |
-
"
|
| 235 |
f" 使用這個模型 [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) 先做語音辨識再做會議紀錄摘要"
|
| 236 |
" 長度沒有限制"
|
| 237 |
),
|
|
|
|
| 49 |
messages=[
|
| 50 |
{
|
| 51 |
"role": "system",
|
| 52 |
+
"content": "你是專業的會議紀錄製作員,請根據分段的會議決證,彙整成正式會議紀錄"
|
| 53 |
},
|
| 54 |
{
|
| 55 |
"role": "user",
|
|
|
|
| 94 |
i=i+1
|
| 95 |
# response=response+call_openai_summary(openaiobj,chunk)
|
| 96 |
|
| 97 |
+
finalresponse=response+'\n\n summary \n\n' +call_openai_api(openaiobj,response)
|
| 98 |
+
return finalresponse
|
| 99 |
# # Processes chunks in parallel
|
| 100 |
# with ThreadPoolExecutor() as executor:
|
| 101 |
# responses = list(executor.map(call_openai_api, [openaiobj,chunks]))
|
|
|
|
| 231 |
theme="huggingface",
|
| 232 |
title="會議紀錄小幫手AINotes",
|
| 233 |
description=(
|
| 234 |
+
"可由麥克風錄音或上傳語音檔,並將本逐字稿欄位清空,若有逐字稿可以直接貼在逐字稿"
|
| 235 |
f" 使用這個模型 [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) 先做語音辨識再做會議紀錄摘要"
|
| 236 |
" 長度沒有限制"
|
| 237 |
),
|