Siyuan0730 commited on
Commit
2452397
·
1 Parent(s): 848b83c
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -291,6 +291,7 @@ def regenerate_content(course_content_list):
291
 
292
  def add_prompt_course_style(selected_style_list):
293
  initiate_prompt = 'Please be siginificantly aware that this course is requested to: \n'
 
294
  if len(selected_style_list) != 0:
295
  customize_prompt += initiate_prompt
296
  for style in selected_style_list:
@@ -300,8 +301,6 @@ def add_prompt_course_style(selected_style_list):
300
  customize_prompt += '- **contain more excercises**. So last part of this lesson should be excercises.\n'
301
  elif style == "Easier to learn":
302
  customize_prompt += '- **Be easier to learn**. So you should use plain language to write the lesson script, and apply some metaphors & analogys wherever appropriate.\n'
303
- else:
304
- customize_prompt = ''
305
 
306
  return customize_prompt
307
 
@@ -327,16 +326,16 @@ def app():
327
  added_files = st.file_uploader('Upload .md or .pdf files, simultaneous mixed upload these types is supported.', type=['.md','.pdf'], accept_multiple_files=True)
328
  with st.expander('Customize my course'):
329
  num_lessons = st.slider('How many lessons do you want this course to have?', min_value=2, max_value=15, value=5, step=1)
330
- language = 'English'
331
- Chinese = st.checkbox('Output in Chinese')
332
- if Chinese:
333
- language = 'Chinese'
334
  custom_options = st.multiselect(
335
- 'Customize ',
336
  ['More examples', 'More excercises', 'Easier to learn'],
337
  max_selections = 2
338
  )
339
  style_options = add_prompt_course_style(custom_options)
 
 
 
 
340
 
341
  btn = st.button('Generate my course!')
342
 
 
291
 
292
  def add_prompt_course_style(selected_style_list):
293
  initiate_prompt = 'Please be siginificantly aware that this course is requested to: \n'
294
+ customize_prompt = ''
295
  if len(selected_style_list) != 0:
296
  customize_prompt += initiate_prompt
297
  for style in selected_style_list:
 
301
  customize_prompt += '- **contain more excercises**. So last part of this lesson should be excercises.\n'
302
  elif style == "Easier to learn":
303
  customize_prompt += '- **Be easier to learn**. So you should use plain language to write the lesson script, and apply some metaphors & analogys wherever appropriate.\n'
 
 
304
 
305
  return customize_prompt
306
 
 
326
  added_files = st.file_uploader('Upload .md or .pdf files, simultaneous mixed upload these types is supported.', type=['.md','.pdf'], accept_multiple_files=True)
327
  with st.expander('Customize my course'):
328
  num_lessons = st.slider('How many lessons do you want this course to have?', min_value=2, max_value=15, value=5, step=1)
 
 
 
 
329
  custom_options = st.multiselect(
330
+ 'Preferred teaching style :grey[(Recommend new users not to select)]',
331
  ['More examples', 'More excercises', 'Easier to learn'],
332
  max_selections = 2
333
  )
334
  style_options = add_prompt_course_style(custom_options)
335
+ language = 'English'
336
+ Chinese = st.checkbox('Output in Chinese')
337
+ if Chinese:
338
+ language = 'Chinese'
339
 
340
  btn = st.button('Generate my course!')
341