Spaces:
Runtime error
Runtime error
Update prompts.py
Browse files- prompts.py +32 -31
prompts.py
CHANGED
@@ -1,32 +1,33 @@
|
|
1 |
-
def get_ppt_prompt():
|
2 |
-
|
3 |
-
PROMPT = """
|
4 |
-
Summarize the input text and arrange it in an array of JSON objects to to be suitable for a powerpoint presentation.
|
5 |
-
Determine the needed number of json objects (slides) based on the length of the text and agenda.
|
6 |
-
Each key point in a slide should be limited to up to 10 words.
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
{"id":
|
21 |
-
{"id":
|
22 |
-
|
23 |
-
['
|
24 |
-
['Operating
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
32 |
return PROMPT
|
|
|
1 |
+
def get_ppt_prompt():
|
2 |
+
|
3 |
+
PROMPT = """
|
4 |
+
Summarize the input text and arrange it in an array of JSON objects to to be suitable for a powerpoint presentation.
|
5 |
+
Determine the needed number of json objects (slides) based on the length of the text and agenda.
|
6 |
+
Each key point in a slide should be limited to up to 10 words.
|
7 |
+
For each key point, add a short explaination for better understanding.
|
8 |
+
Consider maximum of 5 bullet points per slide.
|
9 |
+
Return the response as an array of json objects.
|
10 |
+
The first item in the list must be a json object for the title slide.
|
11 |
+
|
12 |
+
This is a sample of such json object:
|
13 |
+
{
|
14 |
+
"id": 1,
|
15 |
+
"title_text": "My Presentation Title",
|
16 |
+
"subtitle_text": "My presentation subtitle",
|
17 |
+
"is_title_slide": "yes"
|
18 |
+
}
|
19 |
+
And here is the sample of json data for slides:
|
20 |
+
{"id": 2, title_text": "Slide 1 Title", "text": ["Bullet 1", "Bullet 2"]},
|
21 |
+
{"id": 3, title_text": "Slide 2 Title", "text": ["Bullet 1", "Bullet 2", "Bullet 3"]}
|
22 |
+
{"id": 4, title_text": "Slide 2 Title",
|
23 |
+
"table": [[' ', '2022', '2021'],['Revenue (USD Million)','92,379','642,338',],
|
24 |
+
['Operating profit (USD Million)', '6,071', '42,216',],
|
25 |
+
['Operating margin', '6.6%', '6.6%', '19.1%', '8.1%', '9.1%']]
|
26 |
+
}
|
27 |
+
|
28 |
+
Please make sure the json object is correct and valid.
|
29 |
+
Don't output explanation. I just need the JSON array as your output.
|
30 |
+
|
31 |
+
"""
|
32 |
+
|
33 |
return PROMPT
|