barunsaha commited on
Commit
738ec53
1 Parent(s): 07115d9

Add tip on JSON data deep hierarchy and regeneration; change tip icon

Browse files
Files changed (2) hide show
  1. app.py +11 -4
  2. strings.json +2 -2
app.py CHANGED
@@ -144,9 +144,8 @@ def process_topic_inputs(topic: str, progress_bar):
144
 
145
  st.info(
146
  'The generated content doesn\'t look so great?'
147
- ' Need alternatives? Just change your description text and try again.'
148
- ' For example, you can start describing like "Create a slide deck on..."',
149
- icon="ℹ️"
150
  )
151
 
152
  # Move on to step 2
@@ -204,6 +203,14 @@ def process_slides_contents(text: str, progress_bar: st.progress):
204
 
205
  if len(json_str) > 0:
206
  progress_bar.progress(100, text='Done!')
 
 
 
 
 
 
 
 
207
  else:
208
  st.error('Unfortunately, JSON generation failed, so the next steps would lead to nowhere.'
209
  ' Try again or come back later.')
@@ -326,7 +333,7 @@ def show_bonus_stuff(
326
  if len(image) > 0:
327
  image = base64.b64decode(image)
328
  img_contents.image(image, caption=ppt_text)
329
- img_tip.info('Tip: Right-click on the image to save it.', icon="ℹ️")
330
 
331
 
332
  def button_clicked(button):
 
144
 
145
  st.info(
146
  'The generated content doesn\'t look so great?'
147
+ ' Need alternatives? Just change your description text and try again.',
148
+ icon="💡️"
 
149
  )
150
 
151
  # Move on to step 2
 
203
 
204
  if len(json_str) > 0:
205
  progress_bar.progress(100, text='Done!')
206
+ st.info(
207
+ 'Tip: In some scenarios, the JSON creates a deeper nesting of the bullet points'
208
+ ' than what is expected. You can try to regenerate the JSON'
209
+ ' by making a minor change in the topic description in the previous step, e.g.,'
210
+ ' by adding or removing a character. Alternatively, you can edit this in the slide'
211
+ ' deck that would be generated in the next step.',
212
+ icon="💡️"
213
+ )
214
  else:
215
  st.error('Unfortunately, JSON generation failed, so the next steps would lead to nowhere.'
216
  ' Try again or come back later.')
 
333
  if len(image) > 0:
334
  image = base64.b64decode(image)
335
  img_contents.image(image, caption=ppt_text)
336
+ img_tip.info('Tip: Right-click on the image to save it.', icon="💡️")
337
 
338
 
339
  def button_clicked(button):
strings.json CHANGED
@@ -14,10 +14,10 @@
14
  "Since you have come this far, we have unlocked some more good stuff for you!"
15
  ],
16
  "input_labels": [
17
- "**Describe the topic of the presentation. Avoid mentioning the count of slides.**\n*Note: the output may be short or truncated due to API limitations.*"
18
  ],
19
  "button_labels": [
20
- "Generate slides content",
21
  "Generate JSON",
22
  "Make the slides"
23
  ],
 
14
  "Since you have come this far, we have unlocked some more good stuff for you!"
15
  ],
16
  "input_labels": [
17
+ "**Describe the topic of the presentation. Avoid mentioning the count of slides.**\n*Note: the output may be truncated due to API limitations.*"
18
  ],
19
  "button_labels": [
20
+ "Generate contents",
21
  "Generate JSON",
22
  "Make the slides"
23
  ],