tbdavid2019 commited on
Commit
d0794dd
·
verified ·
1 Parent(s): 02a9d87
Files changed (1) hide show
  1. app.py +63 -57
app.py CHANGED
@@ -75,81 +75,87 @@ INSTRUCTION_TEMPLATES = {
75
 
76
  ################# PODCAST ##################
77
 
78
- "podcast": {
79
- "intro": """The following is an input text extracted from a PDF or EPUB. Based on this text, your task is to generate a lively,
80
- relaxed, and informative podcast dialogue, similar in style to the _All-In Podcast_, emphasizing multi-angle discussions,
81
- spontaneous interaction, and the collision of viewpoints.
82
 
83
- The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or ePUbs or web pages.
84
 
85
- Please follow these rules to create the dialogue:
86
- 1. The conversation must have exactly two speakers:
87
- - speaker-1 (he introduces himself as David)
88
- - speaker-2 (she introduces herself as Cordelia)
89
- 2. The conversation must open with speaker-1 saying:
90
- \"歡迎來到 David888 Podcast, 我是 David...\"
91
- 3. speaker-2 must introduce herself as Cordelia during her first speaking turn.
92
- 4. Label each statement or line with speaker-1: or speaker-2: (lowercase, followed by a colon).
93
- 5. Do not use any other role or bracket placeholders like [Host] or [Guest].
94
- 6. The dialogue must proceed for at least 20 rounds (one round is completed after speaker A finishes speaking and speaker B responds). In each round, at least one speaker must deliver detailed content (around 300-500 words), offering 2-3 subtopics for the other speaker to explore further. At the end of a turn, pass the conversation with a question, rebuttal, or topic extension, for example:
95
- - \"Cordelia, 你同意我的觀點嗎?還是你有不同看法?\"
96
- - \"David, 你覺得這個還有什麼隱藏的機會?\"
97
- 7. Speakers can interrupt each other, insert personal experiences, or present challenges to simulate a genuine spontaneous discussion, maintaining a relaxed yet insightful atmosphere.
98
- 8. After every 5 rounds, insert a marker [5輪結束], and briefly summarize key points discussed so far before naturally transitioning to a new topic.
99
- 9. Design the dialogue for audio conversion (it will be directly read aloud), maintaining the humor, sharpness, and interactive feel typical of the _All-In Podcast_.
100
- 10. At the end of the conversation (after at least 20 rounds), both speakers should naturally reinforce main insights and takeaways without sounding explicitly like a recap, gently emphasizing core ideas before concluding.
101
- 11. Please write in Traditional Chinese."""
102
- },
103
 
104
 
105
 
106
 
107
- # "podcast": {
108
- # "intro": """Your task is to take the input text provided and turn it into a lively, engaging, informative podcast dialogue in the style of NPR.
109
- # The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or web pages.
110
 
111
- # We have exactly two speakers in this conversation:
112
- # - speaker-1 (he introduces himself as David)
113
- # - speaker-2 (she introduces herself as Cordelia)
114
 
115
- # The conversation must **open** with speaker-1 saying:
116
- # 「歡迎來到 David888 Podcast,我是 David...」
117
 
118
- # After that, speaker-2 should introduce herself as Cordelia in her first speaking turn.
119
 
120
- # Please label each statement or line with speaker-1: or speaker-2: (all lower case, followed by a colon).
121
- # Do not use any other role or bracket placeholders like [Host] or [Guest].
122
 
123
- # Don't worry about formatting issues or irrelevant information; your goal is to extract the key points, identify definitions, and interesting facts that could be discussed in a podcast.
124
 
125
- # Define all terms used carefully for a broad audience of listeners.
126
- # 輸出文字為繁體中文,請注意。
127
- # """,
128
- # "text_instructions": "First, carefully read through the input text ...",
129
- # "scratch_pad": """Brainstorm creative ways ...""",
130
- # "prelude": """Now that you have brainstormed ...""",
131
- # "dialog": """Write a very long, engaging, informative podcast dialogue here, based on the key points and creative ideas you came up with during the brainstorming session.
132
 
133
- # Use a **two-speaker** conversational format with exactly:
134
- # - "speaker-1:" (David)
135
- # - "speaker-2:" (Cordelia)
136
 
137
- # - The first line must begin with speaker-1: 歡迎來到 David888 Podcast,我是 David...
138
- # - When speaker-2 first speaks, she should introduce herself as Cordelia.
139
 
140
- # Alternate turns naturally to simulate an engaging back-and-forth conversation.
141
- # Do not include bracket placeholders like [Host] or [Guest]; only use speaker-1: or speaker-2: to start each line.
142
 
143
- # Design your output to be read aloud, as it will be directly converted into audio.
144
- # Aim for a long and detailed conversation (around 7000 ~ 9900 words), while still staying on topic and maintaining a fun, accessible style.
145
- # Make sure to cover all key points and definitions from the input text in a lively, NPR-style format.
 
 
 
 
 
 
146
 
147
- # At the end of the dialogue, have the two speakers naturally summarize the main insights and takeaways.
148
- # Avoid making it sound like an obvious recap; the goal is to gently reinforce the central ideas one last time before signing off.
149
 
150
- # 請使用繁體中文撰寫。
151
- # """
152
- # },
153
 
154
  ################# MATERIAL DISCOVERY SUMMARY ##################
155
  "SciAgents material discovery summary": {
 
75
 
76
  ################# PODCAST ##################
77
 
78
+ # "podcast": {
79
+ # "intro": """The following is an input text extracted from a PDF or EPUB. Based on this text, your task is to generate a lively,
80
+ # relaxed, and informative podcast dialogue, similar in style to the _All-In Podcast_, emphasizing multi-angle discussions,
81
+ # spontaneous interaction, and the collision of viewpoints.
82
 
83
+ # The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or ePUbs or web pages.
84
 
85
+ # Please follow these rules to create the dialogue:
86
+ # 1. The conversation must have exactly two speakers:
87
+ # - speaker-1 (he introduces himself as David)
88
+ # - speaker-2 (she introduces herself as Cordelia)
89
+ # 2. The conversation must open with speaker-1 saying:
90
+ # \"歡迎來到 David888 Podcast, 我是 David...\"
91
+ # 3. speaker-2 must introduce herself as Cordelia during her first speaking turn.
92
+ # 4. Label each statement or line with speaker-1: or speaker-2: (lowercase, followed by a colon).
93
+ # 5. Do not use any other role or bracket placeholders like [Host] or [Guest].
94
+ # 6. The dialogue must proceed for at least 20 rounds (one round is completed after speaker A finishes speaking and speaker B responds). In each round, at least one speaker must deliver detailed content (around 300-500 words), offering 2-3 subtopics for the other speaker to explore further. At the end of a turn, pass the conversation with a question, rebuttal, or topic extension, for example:
95
+ # - \"Cordelia, 你同意我的觀點嗎?還是你有不同看法?\"
96
+ # - \"David, 你覺得這個還有什麼隱藏的機會?\"
97
+ # 7. Speakers can interrupt each other, insert personal experiences, or present challenges to simulate a genuine spontaneous discussion, maintaining a relaxed yet insightful atmosphere.
98
+ # 8. After every 5 rounds, insert a marker [5輪結束], and briefly summarize key points discussed so far before naturally transitioning to a new topic.
99
+ # 9. Design the dialogue for audio conversion (it will be directly read aloud), maintaining the humor, sharpness, and interactive feel typical of the _All-In Podcast_.
100
+ # 10. At the end of the conversation (after at least 20 rounds), both speakers should naturally reinforce main insights and takeaways without sounding explicitly like a recap, gently emphasizing core ideas before concluding.
101
+ # 11. Please write in Traditional Chinese."""
102
+ # },
103
 
104
 
105
 
106
 
107
+ "podcast": {
108
+ "intro": """Your task is to take the input text provided and turn it into a lively, engaging, informative podcast dialogue in the style of NPR.
109
+ The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or web pages.
110
 
111
+ We have exactly two speakers in this conversation:
112
+ - speaker-1 (he introduces himself as David)
113
+ - speaker-2 (she introduces herself as Cordelia)
114
 
115
+ The conversation must **open** with speaker-1 saying:
116
+ 「歡迎來到 David888 Podcast,我是 David...」
117
 
118
+ After that, speaker-2 should introduce herself as Cordelia in her first speaking turn.
119
 
120
+ Please label each statement or line with speaker-1: or speaker-2: (all lower case, followed by a colon).
121
+ Do not use any other role or bracket placeholders like [Host] or [Guest].
122
 
123
+ Don't worry about formatting issues or irrelevant information; your goal is to extract the key points, identify definitions, and interesting facts that could be discussed in a podcast.
124
 
125
+ Define all terms used carefully for a broad audience of listeners.
126
+ 輸出文字為繁體中文,請注意。
127
+ """,
128
+ "text_instructions": "First, carefully read through the input text ...",
129
+ "scratch_pad": """Brainstorm creative ways ...""",
130
+ "prelude": """Now that you have brainstormed ...""",
131
+ "dialog": """Write a very long, engaging, informative podcast dialogue here, based on the key points and creative ideas you came up with during the brainstorming session.
132
 
133
+ Use a **two-speaker** conversational format with exactly:
134
+ - "speaker-1:" (David)
135
+ - "speaker-2:" (Cordelia)
136
 
137
+ - The first line must begin with speaker-1: 歡迎來到 David888 Podcast,我是 David...
138
+ - When speaker-2 first speaks, she should introduce herself as Cordelia.
139
 
140
+ Alternate turns naturally to simulate an engaging back-and-forth conversation.
141
+ Do not include bracket placeholders like [Host] or [Guest]; only use speaker-1: or speaker-2: to start each line.
142
 
143
+ Design your output to be read aloud, as it will be directly converted into audio.
144
+
145
+ The dialogue must proceed for at least 20 rounds (one round is completed after speaker A finishes speaking and speaker B responds). In each round, at least one speaker must deliver detailed content (around 300-500 words), offering 2-3 subtopics for the other speaker to explore further. At the end of a turn, pass the conversation with a question, rebuttal, or topic extension, for example:
146
+ - \"Cordelia, 你同意我的觀點嗎?還是你有不同看法?\"
147
+ - \"David, 你覺得這個還有什麼隱藏的機會?\"
148
+ Speakers can interrupt each other, insert personal experiences, or present challenges to simulate a genuine spontaneous discussion, maintaining a relaxed yet insightful atmosphere.
149
+ After every 5 rounds, insert a marker [5輪結束], and briefly summarize key points discussed so far before naturally transitioning to a new topic.
150
+ Design the dialogue for audio conversion (it will be directly read aloud), maintaining the humor, sharpness, and interactive feel typical of the _All-In Podcast_.
151
+
152
 
153
+ At the end of the dialogue, have the two speakers naturally summarize the main insights and takeaways.
154
+ Avoid making it sound like an obvious recap; the goal is to gently reinforce the central ideas one last time before signing off.
155
 
156
+ 請使用繁體中文撰寫。
157
+ """
158
+ },
159
 
160
  ################# MATERIAL DISCOVERY SUMMARY ##################
161
  "SciAgents material discovery summary": {