phyloforfun commited on
Commit
bb0313e
1 Parent(s): cc75837

file upload gallery

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -684,11 +684,22 @@ def load_prompt_yaml(filename):
684
  st.session_state['prompt_author'] = st.session_state['prompt_info'].get('prompt_author', st.session_state['default_prompt_author'])
685
  st.session_state['prompt_author_institution'] = st.session_state['prompt_info'].get('prompt_author_institution', st.session_state['default_prompt_author_institution'])
686
  st.session_state['prompt_description'] = st.session_state['prompt_info'].get('prompt_description', st.session_state['default_prompt_description'])
 
687
  st.session_state['instructions'] = st.session_state['prompt_info'].get('instructions', st.session_state['default_instructions'])
688
  st.session_state['json_formatting_instructions'] = st.session_state['prompt_info'].get('json_formatting_instructions', st.session_state['default_json_formatting_instructions'] )
689
  st.session_state['rules'] = st.session_state['prompt_info'].get('rules', {})
690
  st.session_state['mapping'] = st.session_state['prompt_info'].get('mapping', {})
691
- st.session_state['LLM'] = st.session_state['prompt_info'].get('LLM', 'gpt')
 
 
 
 
 
 
 
 
 
 
692
 
693
  # Placeholder:
694
  st.session_state['assigned_columns'] = list(chain.from_iterable(st.session_state['mapping'].values()))
@@ -798,11 +809,11 @@ def btn_load_prompt(selected_yaml_file, dir_prompt):
798
  'prompt_author': st.session_state['prompt_author'],
799
  'prompt_author_institution': st.session_state['prompt_author_institution'],
800
  'prompt_description': st.session_state['prompt_description'],
 
801
  'instructions': st.session_state['instructions'],
802
  'json_formatting_instructions': st.session_state['json_formatting_instructions'],
803
  'rules': st.session_state['rules'],
804
  'mapping': st.session_state['mapping'],
805
- 'LLM': st.session_state['LLM']
806
  }
807
 
808
 
 
684
  st.session_state['prompt_author'] = st.session_state['prompt_info'].get('prompt_author', st.session_state['default_prompt_author'])
685
  st.session_state['prompt_author_institution'] = st.session_state['prompt_info'].get('prompt_author_institution', st.session_state['default_prompt_author_institution'])
686
  st.session_state['prompt_description'] = st.session_state['prompt_info'].get('prompt_description', st.session_state['default_prompt_description'])
687
+ st.session_state['LLM'] = st.session_state['prompt_info'].get('LLM', 'gpt')
688
  st.session_state['instructions'] = st.session_state['prompt_info'].get('instructions', st.session_state['default_instructions'])
689
  st.session_state['json_formatting_instructions'] = st.session_state['prompt_info'].get('json_formatting_instructions', st.session_state['default_json_formatting_instructions'] )
690
  st.session_state['rules'] = st.session_state['prompt_info'].get('rules', {})
691
  st.session_state['mapping'] = st.session_state['prompt_info'].get('mapping', {})
692
+
693
+ st.session_state['prompt_info'] = {
694
+ 'prompt_author': st.session_state['prompt_author'],
695
+ 'prompt_author_institution': st.session_state['prompt_author_institution'],
696
+ 'prompt_description': st.session_state['prompt_description'],
697
+ 'LLM': st.session_state['LLM'],
698
+ 'instructions': st.session_state['instructions'],
699
+ 'json_formatting_instructions': st.session_state['json_formatting_instructions'],
700
+ 'rules': st.session_state['rules'],
701
+ 'mapping': st.session_state['mapping'],
702
+ }
703
 
704
  # Placeholder:
705
  st.session_state['assigned_columns'] = list(chain.from_iterable(st.session_state['mapping'].values()))
 
809
  'prompt_author': st.session_state['prompt_author'],
810
  'prompt_author_institution': st.session_state['prompt_author_institution'],
811
  'prompt_description': st.session_state['prompt_description'],
812
+ 'LLM': st.session_state['LLM'],
813
  'instructions': st.session_state['instructions'],
814
  'json_formatting_instructions': st.session_state['json_formatting_instructions'],
815
  'rules': st.session_state['rules'],
816
  'mapping': st.session_state['mapping'],
 
817
  }
818
 
819