barunsaha commited on
Commit
1904a12
1 Parent(s): da7207a

Pre-load page with a haiku

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -33,9 +33,18 @@ and the underlying AI models.</small></p>
33
  """
34
  st.markdown(footer, unsafe_allow_html=True)
35
 
 
 
 
 
 
 
 
 
36
  poem = st.text_area(
37
- f'''**Type or copy-paste a poem (max. {Config.LLM_MAX_INPUT_LENGTH} characters will be considered):**''',
38
- ''
 
39
  )
40
 
41
  if st.button('Generate image'):
 
33
  """
34
  st.markdown(footer, unsafe_allow_html=True)
35
 
36
+ preload_text = ''
37
+
38
+ try:
39
+ with open('examples/old_pond.txt', 'r', encoding='utf8') as in_file:
40
+ preload_text = in_file.read().strip()
41
+ except Exception:
42
+ pass
43
+
44
  poem = st.text_area(
45
+ f'''**Type or copy-paste a poem or start off with the following haiku
46
+ (max. {Config.LLM_MAX_INPUT_LENGTH} characters will be considered):**''',
47
+ preload_text
48
  )
49
 
50
  if st.button('Generate image'):