Spaces:
Build error
Build error
Commit
·
adf1477
1
Parent(s):
567db67
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ openai.api_key = os.environ["OPENAI_API_KEY"]
|
|
6 |
|
7 |
def generate_pptx(lesson_topic):
|
8 |
prompt = (
|
9 |
-
"I need you to create PowerPoint slides based on a given lesson plan. Create a set of PowerPoint slides to help a teacher effectively teach the lesson described in the given lesson plan:\n"
|
10 |
f"{lesson_topic}\n\n"
|
11 |
-
"The slides should be visually engaging and include concise headings, bullet points, and relevant images or icons. Make sure to provide any necessary information, such as activity steps or reflection questions."
|
12 |
"For the first slide, include the lesson title and any relevant sub-points. Choose a PowerPoint theme from these options: dark, light, corporate, or playful, depending on the lesson's context."
|
13 |
"The output should be suitable for use with the python-pptx library to create a PowerPoint presentation.\n\n"
|
14 |
"Lesson Plan:\n\n"
|
@@ -20,7 +20,7 @@ def generate_pptx(lesson_topic):
|
|
20 |
"Sub-point 2:\n"
|
21 |
"...\n"
|
22 |
"If an image is relevant, include: 'Image: short_description_of_image'\n"
|
23 |
-
"If an icon is relevant, include: 'Icon:
|
24 |
"When creating the slides, remember to use clear and concise language, appropriate images or icons, and choose a suitable theme for the PowerPoint presentation."
|
25 |
)
|
26 |
|
@@ -30,7 +30,7 @@ def generate_pptx(lesson_topic):
|
|
30 |
{
|
31 |
"role": "system",
|
32 |
"content": (
|
33 |
-
"You are a helpful assistant capable of creating PowerPoint slide outlines based on a given lesson plan. Ensure that the slides include concise headings, bullet points, relevant images or icons, and any necessary information such as activity steps or reflection questions."
|
34 |
),
|
35 |
},
|
36 |
{"role": "user", "content": prompt},
|
|
|
6 |
|
7 |
def generate_pptx(lesson_topic):
|
8 |
prompt = (
|
9 |
+
"I need you to create PowerPoint slides based on a given lesson plan. Create a set of clear and concise PowerPoint slides to help a teacher effectively teach the lesson described in the given lesson plan:\n"
|
10 |
f"{lesson_topic}\n\n"
|
11 |
+
"The slides should be visually engaging and include concise headings, bullet points, and relevant images or icons. Make sure to provide any necessary information, such as activity steps or reflection questions. Limit each slide to a maximum of 3-4 sub-points and a single image or icon when relevant. If necessary, divide the same heading into multiple slides to make the points more clear."
|
12 |
"For the first slide, include the lesson title and any relevant sub-points. Choose a PowerPoint theme from these options: dark, light, corporate, or playful, depending on the lesson's context."
|
13 |
"The output should be suitable for use with the python-pptx library to create a PowerPoint presentation.\n\n"
|
14 |
"Lesson Plan:\n\n"
|
|
|
20 |
"Sub-point 2:\n"
|
21 |
"...\n"
|
22 |
"If an image is relevant, include: 'Image: short_description_of_image'\n"
|
23 |
+
"If an icon is relevant, include: 'Icon: font_awesome_icon_code the python library will understand'\n\n"
|
24 |
"When creating the slides, remember to use clear and concise language, appropriate images or icons, and choose a suitable theme for the PowerPoint presentation."
|
25 |
)
|
26 |
|
|
|
30 |
{
|
31 |
"role": "system",
|
32 |
"content": (
|
33 |
+
"You are a helpful assistant capable of creating clear and concise PowerPoint slide outlines based on a given lesson plan. Ensure that the slides include concise headings, bullet points, relevant images or icons, and any necessary information such as activity steps or reflection questions. Limit each slide to a maximum of 3-4 sub-points and a single image or icon when relevant."
|
34 |
),
|
35 |
},
|
36 |
{"role": "user", "content": prompt},
|