Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,6 @@ def create_client(api_key=None):
|
|
13 |
return openai.OpenAI(api_key=openai.api_key, base_url="https://api.sambanova.ai/v1")
|
14 |
|
15 |
def generate_response(input_text, language, speaker1, speaker2, api_key):
|
16 |
-
# 分割 speaker 名稱,只取第一部分(名字)
|
17 |
speaker1_name = speaker1.split(' - ')[0]
|
18 |
speaker2_name = speaker2.split(' - ')[0]
|
19 |
|
@@ -36,7 +35,7 @@ def generate_response(input_text, language, speaker1, speaker2, api_key):
|
|
36 |
將你的頭腦風暴想法和Podcast對話的粗略大綱寫在這裡。確保記錄下你希望在結尾重申的主要見解和要點。
|
37 |
</scratchpad>
|
38 |
|
39 |
-
|
40 |
- The podcast should have 2 speakers: {speaker1_name} and {speaker2_name}.
|
41 |
- The podcast should be long.
|
42 |
- The podcast should be interesting, lively, and engaging, and hook the listener from the start.
|
@@ -54,7 +53,7 @@ Follow this example structure:
|
|
54 |
```
|
55 |
|
56 |
<podcast_dialogue>
|
57 |
-
|
58 |
|
59 |
確保對話儘可能詳細、完整,同時保持在主題之內並維持吸引人的流暢性。目標是使用你的全部輸出容量,建立儘可能長的Podcast節目,同時以有趣的方式傳遞輸入文字中的關鍵訊息。
|
60 |
|
|
|
13 |
return openai.OpenAI(api_key=openai.api_key, base_url="https://api.sambanova.ai/v1")
|
14 |
|
15 |
def generate_response(input_text, language, speaker1, speaker2, api_key):
|
|
|
16 |
speaker1_name = speaker1.split(' - ')[0]
|
17 |
speaker2_name = speaker2.split(' - ')[0]
|
18 |
|
|
|
35 |
將你的頭腦風暴想法和Podcast對話的粗略大綱寫在這裡。確保記錄下你希望在結尾重申的主要見解和要點。
|
36 |
</scratchpad>
|
37 |
|
38 |
+
現在你已經進行了頭腦風暴並建立了一個粗略的大綱,是時候以{language}撰寫實際的Podcast對話了。目標是主持人({speaker1_name})與嘉賓({speaker2_name})之間自然、對話式的交流。融入你在頭腦風暴中得出的最佳想法,並確保將任何複雜話題以易於理解的方式解釋清楚。
|
39 |
- The podcast should have 2 speakers: {speaker1_name} and {speaker2_name}.
|
40 |
- The podcast should be long.
|
41 |
- The podcast should be interesting, lively, and engaging, and hook the listener from the start.
|
|
|
53 |
```
|
54 |
|
55 |
<podcast_dialogue>
|
56 |
+
根據你在頭腦風暴階段提出的關鍵點和創造性想法,以{language}撰寫你的引人入勝、訊息豐富的Podcast對話。採用對話式的語氣,並包括任何必要的上下文或解釋,使內容對一般聽眾而言容易理解。使用主持人名字 {speaker1_name} 和嘉賓名字 {speaker2_name},以營造更吸引人和身臨其境的聆聽體驗。不要包括像[主持人]或[嘉賓]這樣的括號預留位置。設計你的輸出內容以供直接朗讀——它將直接轉換為音訊。
|
57 |
|
58 |
確保對話儘可能詳細、完整,同時保持在主題之內並維持吸引人的流暢性。目標是使用你的全部輸出容量,建立儘可能長的Podcast節目,同時以有趣的方式傳遞輸入文字中的關鍵訊息。
|
59 |
|