Spaces:
Configuration error
Configuration error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def generate_response(input_text, language, speaker1, speaker2, api_key):
|
|
| 18 |
if language == "Auto Detect":
|
| 19 |
language_instruction = "- The podcast MUST be in the same language as the user input."
|
| 20 |
else:
|
| 21 |
-
language_instruction = f"- The podcast
|
| 22 |
print(language_instruction)
|
| 23 |
system_prompt = f"""你的任務是將提供的輸入文字轉換為一個引人入勝、訊息豐富且專業的Podcast對話。輸入文字可能會比較混亂或結構不完整,因為它可能來自不同來源,如PDF檔案或文字檔等。不要擔心格式問題或任何不相關的訊息;你的目標是提取可以在Podcast中討論的關鍵點、識別重要定義,並突出有趣的事實。
|
| 24 |
|
|
@@ -45,7 +45,7 @@ def generate_response(input_text, language, speaker1, speaker2, api_key):
|
|
| 45 |
- The podcast should be long.
|
| 46 |
- The podcast should be interesting, lively, and engaging, and hook the listener from the start.
|
| 47 |
- The script must be in JSON format.
|
| 48 |
-
Follow this example structure:
|
| 49 |
```
|
| 50 |
{{
|
| 51 |
"speaker1": "歡迎收聽財資歐北共Podcast,我是主持人{speaker1_name},今天我們邀請到專家{speaker2_name},百忙之中來上我們節目",
|
|
|
|
| 18 |
if language == "Auto Detect":
|
| 19 |
language_instruction = "- The podcast MUST be in the same language as the user input."
|
| 20 |
else:
|
| 21 |
+
language_instruction = f"- The podcast Must reply to me in {language} language."
|
| 22 |
print(language_instruction)
|
| 23 |
system_prompt = f"""你的任務是將提供的輸入文字轉換為一個引人入勝、訊息豐富且專業的Podcast對話。輸入文字可能會比較混亂或結構不完整,因為它可能來自不同來源,如PDF檔案或文字檔等。不要擔心格式問題或任何不相關的訊息;你的目標是提取可以在Podcast中討論的關鍵點、識別重要定義,並突出有趣的事實。
|
| 24 |
|
|
|
|
| 45 |
- The podcast should be long.
|
| 46 |
- The podcast should be interesting, lively, and engaging, and hook the listener from the start.
|
| 47 |
- The script must be in JSON format.
|
| 48 |
+
Follow this example structure, MUST be in {language} language:
|
| 49 |
```
|
| 50 |
{{
|
| 51 |
"speaker1": "歡迎收聽財資歐北共Podcast,我是主持人{speaker1_name},今天我們邀請到專家{speaker2_name},百忙之中來上我們節目",
|