Spaces:
Build error
Build error
Commit
·
9cc92d3
1
Parent(s):
72c943d
Update app.py
Browse files
app.py
CHANGED
@@ -6,18 +6,18 @@ openai.api_key = os.environ["OPENAI_API_KEY"]
|
|
6 |
|
7 |
def generate_pptx(lesson_topic):
|
8 |
prompt = (
|
9 |
-
"Create
|
10 |
-
"\n\nFor the first slide, include the lesson title and
|
11 |
-
"\n\nThe output should be suitable for use with the python-pptx library to create a PowerPoint presentation
|
12 |
-
"
|
13 |
-
"
|
14 |
"#. Slide (slide_title):\n"
|
15 |
"Heading: concise_heading\n"
|
16 |
"Sub-point 1:\n"
|
17 |
"Sub-point 2:\n"
|
18 |
"...\n"
|
19 |
"If an image is relevant, include: 'Image: short_description_of_image'\n"
|
20 |
-
"If an icon is relevant, include: 'Icon: font_awesome_icon_code'\n
|
21 |
"When creating the slides, remember to use clear and concise language, write the slides for the students to understand, and use appropriate images or icons, and choose a suitable theme for the PowerPoint presentation."
|
22 |
.format(lesson_topic=lesson_topic)
|
23 |
)
|
|
|
6 |
|
7 |
def generate_pptx(lesson_topic):
|
8 |
prompt = (
|
9 |
+
"Create PowerPoint slides for a lesson plan. The slides should be visually engaging, include concise headings and bullet points, and have relevant images or icons when necessary. Limit each slide to a maximum of 3-4 sub-points and a single image or icon when relevant. Divide the same heading into multiple slides if required to make the points more clear."
|
10 |
+
"\n\nFor the first slide, include the lesson title and relevant sub-points. Also, include a closing slide with takeaways from the lesson. Choose a PowerPoint theme from these options: dark, light, corporate, or playful, depending on the lesson's context."
|
11 |
+
"\n\nThe output should be suitable for use with the python-pptx library to create a PowerPoint presentation."
|
12 |
+
"\n\nLesson Plan:\n{lesson_plan}"
|
13 |
+
"\n\nFor each slide, provide this information:\n\n"
|
14 |
"#. Slide (slide_title):\n"
|
15 |
"Heading: concise_heading\n"
|
16 |
"Sub-point 1:\n"
|
17 |
"Sub-point 2:\n"
|
18 |
"...\n"
|
19 |
"If an image is relevant, include: 'Image: short_description_of_image'\n"
|
20 |
+
"If an icon is relevant, include: 'Icon: font_awesome_icon_code'\n"
|
21 |
"When creating the slides, remember to use clear and concise language, write the slides for the students to understand, and use appropriate images or icons, and choose a suitable theme for the PowerPoint presentation."
|
22 |
.format(lesson_topic=lesson_topic)
|
23 |
)
|