npc0 commited on
Commit
cba281c
·
verified ·
1 Parent(s): 84ff616

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -35,12 +35,15 @@ if 'ft' in st.session_state or st.button('Next step'):
35
  messages=messages,
36
  model="llama3-70b-8192",
37
  )
 
38
 
39
- ft = st.text_area("Factors to be considered in questions",
40
- chat_completion.choices[0].message.content)
41
- st.session_state['ft'] = ft
 
42
  st.write('Edit above factors, add or remove if needed')
43
 
 
44
  rf = os.environ.get("DESIGN_PROMPT")
45
 
46
  if st.button('Generate questions'):
@@ -65,4 +68,6 @@ if 'ft' in st.session_state or st.button('Next step'):
65
  md = chat_completion.choices[0].message.content
66
  suggested_sampling = 5 * len(md.split("\n"))
67
  st.markdown(f"{md}\n\n**suggested number of sampling**: {suggested_sampling}")
68
- # dump questions into excel and allow download
 
 
 
35
  messages=messages,
36
  model="llama3-70b-8192",
37
  )
38
+ st.session_state['ft'] = chat_completion.choices[0].message.content
39
 
40
+ st.session_state['ft'] = st.text_area(
41
+ "Factors to be considered in questions",
42
+ st.session_state['ft'],
43
+ height=300)
44
  st.write('Edit above factors, add or remove if needed')
45
 
46
+ ft = st.session_state['ft']
47
  rf = os.environ.get("DESIGN_PROMPT")
48
 
49
  if st.button('Generate questions'):
 
68
  md = chat_completion.choices[0].message.content
69
  suggested_sampling = 5 * len(md.split("\n"))
70
  st.markdown(f"{md}\n\n**suggested number of sampling**: {suggested_sampling}")
71
+ # dump questions into excel and allow download
72
+
73
+ del st.session_state['ft']