phyloforfun commited on
Commit
9315cb7
1 Parent(s): 5f34674

Major update. Support for 15 LLMs, World Flora Online taxonomy validation, geolocation, 2 OCR methods, significant UI changes, stability improvements, consistent JSON parsing

Browse files
Files changed (2) hide show
  1. README.md +2 -0
  2. app.py +14 -13
README.md CHANGED
@@ -8,6 +8,8 @@ sdk_version: 1.28.1
8
  app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-4.0
 
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
8
  app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-4.0
11
+ preload_from_hub:
12
+ - microsoft/trocr-base-handwritten
13
  ---
14
 
15
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -2247,14 +2247,15 @@ st.set_page_config(layout="wide", page_icon='img/icon.ico', page_title='VoucherV
2247
 
2248
  # Parse the 'is_hf' argument and set it in session state
2249
  if 'is_hf' not in st.session_state:
2250
- try:
2251
- is_hf_arg = parse_command_line_argument('is_hf')
2252
- if is_hf_arg == '1':
2253
- st.session_state['is_hf'] = True
2254
- else:
2255
- st.session_state['is_hf'] = False
2256
- except:
2257
- st.session_state['is_hf'] = True
 
2258
 
2259
 
2260
  # Default YAML file path
@@ -2361,11 +2362,11 @@ if 'proceed_to_space_saver' not in st.session_state:
2361
  # Main ##########################################################################################################################################
2362
  #################################################################################################################################################
2363
 
2364
- if not st.session_state.private_file and not st.session_state['is_hf']:
2365
- create_private_file()
2366
- elif st.session_state.proceed_to_build_llm_prompt:
2367
  build_LLM_prompt_config()
2368
- elif st.session_state.proceed_to_private and not st.session_state['is_hf']:
2369
- create_private_file()
2370
  elif st.session_state.proceed_to_main:
2371
  main()
 
2247
 
2248
  # Parse the 'is_hf' argument and set it in session state
2249
  if 'is_hf' not in st.session_state:
2250
+ st.session_state['is_hf'] = True
2251
+ # try:
2252
+ # is_hf_arg = parse_command_line_argument('is_hf')
2253
+ # if is_hf_arg == '1':
2254
+ # st.session_state['is_hf'] = True
2255
+ # else:
2256
+ # st.session_state['is_hf'] = False
2257
+ # except:
2258
+ # st.session_state['is_hf'] = True
2259
 
2260
 
2261
  # Default YAML file path
 
2362
  # Main ##########################################################################################################################################
2363
  #################################################################################################################################################
2364
 
2365
+ # if not st.session_state.private_file and not st.session_state['is_hf']:
2366
+ # create_private_file()
2367
+ if st.session_state.proceed_to_build_llm_prompt:
2368
  build_LLM_prompt_config()
2369
+ # elif st.session_state.proceed_to_private and not st.session_state['is_hf']:
2370
+ # create_private_file()
2371
  elif st.session_state.proceed_to_main:
2372
  main()