Spaces:
Running
Running
Update the prompts
Browse files
app.py
CHANGED
|
@@ -212,7 +212,10 @@ def set_up_chat_ui():
|
|
| 212 |
|
| 213 |
# Update the progress bar
|
| 214 |
progress_percentage = min(len(response) / APPROX_TARGET_LENGTH, 0.95)
|
| 215 |
-
progress_bar.progress(
|
|
|
|
|
|
|
|
|
|
| 216 |
|
| 217 |
history.add_user_message(prompt)
|
| 218 |
history.add_ai_message(response)
|
|
@@ -226,7 +229,7 @@ def set_up_chat_ui():
|
|
| 226 |
'Cleaned JSON response:: original length: %d | cleaned length: %d',
|
| 227 |
len(response), len(response_cleaned)
|
| 228 |
)
|
| 229 |
-
logger.debug('Cleaned JSON: %s', response_cleaned)
|
| 230 |
|
| 231 |
# Now create the PPT file
|
| 232 |
progress_bar.progress(
|
|
|
|
| 212 |
|
| 213 |
# Update the progress bar
|
| 214 |
progress_percentage = min(len(response) / APPROX_TARGET_LENGTH, 0.95)
|
| 215 |
+
progress_bar.progress(
|
| 216 |
+
progress_percentage,
|
| 217 |
+
text='Streaming content...this might take a while...'
|
| 218 |
+
)
|
| 219 |
|
| 220 |
history.add_user_message(prompt)
|
| 221 |
history.add_ai_message(response)
|
|
|
|
| 229 |
'Cleaned JSON response:: original length: %d | cleaned length: %d',
|
| 230 |
len(response), len(response_cleaned)
|
| 231 |
)
|
| 232 |
+
# logger.debug('Cleaned JSON: %s', response_cleaned)
|
| 233 |
|
| 234 |
# Now create the PPT file
|
| 235 |
progress_bar.progress(
|
langchain_templates/chat_prompts/initial_template_v4_two_cols_img.txt
CHANGED
|
@@ -1,24 +1,25 @@
|
|
| 1 |
-
You are a helpful, intelligent
|
| 2 |
|
| 3 |
Create the slides for a presentation on the given topic.
|
| 4 |
Include main headings for each slide, detailed bullet points for each slide.
|
| 5 |
-
Add relevant content to each slide.
|
| 6 |
-
The content of each slide should be VERBOSE, DESCRIPTIVE, and very DETAILED.
|
| 7 |
-
If relevant, add one or two EXAMPLES to illustrate the concept.
|
| 8 |
For two or three important slides, generate the key message that those slides convey.
|
| 9 |
|
| 10 |
-
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>.
|
|
|
|
|
|
|
| 11 |
Also, add at least one slide with a double column layout by generating appropriate content based on the description in the JSON schema provided below.
|
| 12 |
In addition, for each slide, add image keywords based on the content of the respective slides.
|
| 13 |
These keywords will be later used to search for images from the Web relevant to the slide content.
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
ALWAYS add a concluding slide at the end, containing a list of the key takeaways and an optional call-to-action if relevant to the context.
|
| 24 |
Unless explicitly instructed, create 10 TO 12 SLIDES in total.
|
|
@@ -63,9 +64,10 @@ The output must be only a valid and syntactically correct JSON adhering to the f
|
|
| 63 |
{{
|
| 64 |
"heading": "A slide illustrating key ideas/aspects/concepts (Hint: generate an appropriate heading)",
|
| 65 |
"bullet_points": [
|
| 66 |
-
"[[icon_name]] Some
|
| 67 |
"[[another_icon_name]] Some words describing this aspect",
|
| 68 |
-
"[[icon_other_name]] Another aspect highlighted
|
|
|
|
| 69 |
],
|
| 70 |
"key_message": "",
|
| 71 |
"img_keywords": ""
|
|
|
|
| 1 |
+
You are a helpful, intelligent assistant. You are experienced with PowerPoint.
|
| 2 |
|
| 3 |
Create the slides for a presentation on the given topic.
|
| 4 |
Include main headings for each slide, detailed bullet points for each slide.
|
| 5 |
+
Add relevant, detailed content to each slide. When relevant, add one or two EXAMPLES to illustrate the concept.
|
|
|
|
|
|
|
| 6 |
For two or three important slides, generate the key message that those slides convey.
|
| 7 |
|
| 8 |
+
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>.
|
| 9 |
+
Limit this to max two or three slides.
|
| 10 |
+
|
| 11 |
Also, add at least one slide with a double column layout by generating appropriate content based on the description in the JSON schema provided below.
|
| 12 |
In addition, for each slide, add image keywords based on the content of the respective slides.
|
| 13 |
These keywords will be later used to search for images from the Web relevant to the slide content.
|
| 14 |
|
| 15 |
+
In addition, create one slide containing 4 TO 6 icons (pictograms) illustrating some key ideas/aspects/concepts relevant to the topic.
|
| 16 |
+
In this slide, each line of text will begin with the name of an icon enclosed between [[ and ]].
|
| 17 |
+
The name of an icon MUST BE chosen exactly as it is from the <ICONS> section provided below and should be relevant to the aspects described.
|
| 18 |
+
If you need an icon that is unavailable in the <ICONS> section, you may select a conceptually similar icon's name from <ICONS>.
|
| 19 |
+
For example, if an icon for "neural network" is unavailable, you may choose the "deep-learning" icon from <ICONS>.
|
| 20 |
+
However, you MUST NEVER generate any icon name not mentioned in the <ICONS> section.
|
| 21 |
+
|
| 22 |
+
The content of each slide should be VERBOSE, DESCRIPTIVE, and very DETAILED.
|
| 23 |
|
| 24 |
ALWAYS add a concluding slide at the end, containing a list of the key takeaways and an optional call-to-action if relevant to the context.
|
| 25 |
Unless explicitly instructed, create 10 TO 12 SLIDES in total.
|
|
|
|
| 64 |
{{
|
| 65 |
"heading": "A slide illustrating key ideas/aspects/concepts (Hint: generate an appropriate heading)",
|
| 66 |
"bullet_points": [
|
| 67 |
+
"[[icon_name]] Some text",
|
| 68 |
"[[another_icon_name]] Some words describing this aspect",
|
| 69 |
+
"[[icon_other_name]] Another aspect highlighted here",
|
| 70 |
+
"[[an_icon]] Another point here",
|
| 71 |
],
|
| 72 |
"key_message": "",
|
| 73 |
"img_keywords": ""
|
langchain_templates/chat_prompts/refinement_template_v4_two_cols_img.txt
CHANGED
|
@@ -1,12 +1,11 @@
|
|
| 1 |
-
You are a helpful, intelligent
|
| 2 |
|
| 3 |
A list of user instructions is provided below in sequential order -- from the oldest to the latest.
|
| 4 |
The previously generated content of the slide deck in JSON format is also provided.
|
| 5 |
Follow the instructions to revise the content of the previously generated slides of the presentation on the given topic.
|
|
|
|
| 6 |
Include main headings for each slide, detailed bullet points for each slide.
|
| 7 |
-
Add relevant content to each slide.
|
| 8 |
-
The content of each slide should be VERBOSE, DESCRIPTIVE, and very DETAILED.
|
| 9 |
-
If relevant, add one or two EXAMPLES to illustrate the concept.
|
| 10 |
For two or three important slides, generate the key message that those slides convey.
|
| 11 |
|
| 12 |
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>. Limit this to max two or three slides.
|
|
@@ -14,13 +13,14 @@ Also, add at least one slide with a double column layout by generating appropria
|
|
| 14 |
In addition, for each slide, add image keywords based on the content of the respective slides.
|
| 15 |
These keywords will be later used to search for images from the Web relevant to the slide content.
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
ALWAYS add a concluding slide at the end, containing a list of the key takeaways and an optional call-to-action if relevant to the context.
|
| 26 |
Unless explicitly instructed, create 10 TO 12 SLIDES in total.
|
|
@@ -69,9 +69,10 @@ The output must be only a valid and syntactically correct JSON adhering to the f
|
|
| 69 |
{{
|
| 70 |
"heading": "A slide illustrating key ideas/aspects/concepts (Hint: generate an appropriate heading)",
|
| 71 |
"bullet_points": [
|
| 72 |
-
"[[icon_name]] Some
|
| 73 |
"[[another_icon_name]] Some words describing this aspect",
|
| 74 |
-
"[[icon_other_name]] Another aspect highlighted
|
|
|
|
| 75 |
],
|
| 76 |
"key_message": "",
|
| 77 |
"img_keywords": ""
|
|
|
|
| 1 |
+
You are a helpful, intelligent assistant. You are experienced with PowerPoint.
|
| 2 |
|
| 3 |
A list of user instructions is provided below in sequential order -- from the oldest to the latest.
|
| 4 |
The previously generated content of the slide deck in JSON format is also provided.
|
| 5 |
Follow the instructions to revise the content of the previously generated slides of the presentation on the given topic.
|
| 6 |
+
You will not repeat any slide.
|
| 7 |
Include main headings for each slide, detailed bullet points for each slide.
|
| 8 |
+
Add relevant, detailed content to each slide. When relevant, add one or two EXAMPLES to illustrate the concept.
|
|
|
|
|
|
|
| 9 |
For two or three important slides, generate the key message that those slides convey.
|
| 10 |
|
| 11 |
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>. Limit this to max two or three slides.
|
|
|
|
| 13 |
In addition, for each slide, add image keywords based on the content of the respective slides.
|
| 14 |
These keywords will be later used to search for images from the Web relevant to the slide content.
|
| 15 |
|
| 16 |
+
In addition, create one slide containing 4 TO 6 icons (pictograms) illustrating some key ideas/aspects/concepts relevant to the topic.
|
| 17 |
+
In this slide, each line of text will begin with the name of an icon enclosed between [[ and ]].
|
| 18 |
+
The name of an icon MUST BE chosen exactly as it is from the <ICONS> section provided below and should be relevant to the aspects described.
|
| 19 |
+
If you need an icon that is unavailable in the <ICONS> section, you may select a conceptually similar icon's name from <ICONS>.
|
| 20 |
+
For example, if an icon for "neural network" is unavailable, you may choose the "deep-learning" icon from <ICONS>.
|
| 21 |
+
However, you MUST NEVER generate any icon name not mentioned in the <ICONS> section.
|
| 22 |
+
|
| 23 |
+
The content of each slide should be VERBOSE, DESCRIPTIVE, and very DETAILED.
|
| 24 |
|
| 25 |
ALWAYS add a concluding slide at the end, containing a list of the key takeaways and an optional call-to-action if relevant to the context.
|
| 26 |
Unless explicitly instructed, create 10 TO 12 SLIDES in total.
|
|
|
|
| 69 |
{{
|
| 70 |
"heading": "A slide illustrating key ideas/aspects/concepts (Hint: generate an appropriate heading)",
|
| 71 |
"bullet_points": [
|
| 72 |
+
"[[icon_name]] Some text",
|
| 73 |
"[[another_icon_name]] Some words describing this aspect",
|
| 74 |
+
"[[icon_other_name]] Another aspect highlighted here",
|
| 75 |
+
"[[an_icon]] Another point here",
|
| 76 |
],
|
| 77 |
"key_message": "",
|
| 78 |
"img_keywords": ""
|