Spaces:
Running
Running
phyloforfun
commited on
Commit
·
697083f
1
Parent(s):
f2055e5
file upload gallery
Browse files- app.py +4 -2
- vouchervision/vouchervision_main.py +1 -1
app.py
CHANGED
@@ -623,7 +623,7 @@ def show_available_APIs():
|
|
623 |
table = {
|
624 |
'Google Vision OCR API (required!)': emoji_good if st.session_state['has_key_google_OCR'] else emoji_bad,
|
625 |
'OpenAI API': emoji_good if st.session_state['has_key_openai'] else emoji_bad,
|
626 |
-
'
|
627 |
'OpenAI API (Azure)': emoji_good if st.session_state['has_key_azure'] else emoji_bad,
|
628 |
}
|
629 |
for api_name, status in table.items():
|
@@ -838,7 +838,8 @@ def btn_load_prompt(selected_yaml_file, dir_prompt):
|
|
838 |
'mapping': st.session_state['mapping'],
|
839 |
}
|
840 |
|
841 |
-
|
|
|
842 |
|
843 |
def upload_local_prompt_to_server(dir_prompt):
|
844 |
uploaded_file = st.file_uploader("Upload a custom prompt file", type=['yaml'])
|
@@ -1293,6 +1294,7 @@ def content_header():
|
|
1293 |
st.button("Start Processing", type='primary', disabled=True)
|
1294 |
# st.error(":heavy_exclamation_mark: Required API keys not set. Please visit the 'API Keys' tab and set the Google Vision OCR API key and at least one LLM key.")
|
1295 |
st.error(":heavy_exclamation_mark: Required API keys not set. Please set the API keys as 'Secrets' for your Hugging Face Space. Visit the 'Settings' tab at the top of the page.")
|
|
|
1296 |
|
1297 |
with col_run_2:
|
1298 |
st.subheader('Run Tests', help="")
|
|
|
623 |
table = {
|
624 |
'Google Vision OCR API (required!)': emoji_good if st.session_state['has_key_google_OCR'] else emoji_bad,
|
625 |
'OpenAI API': emoji_good if st.session_state['has_key_openai'] else emoji_bad,
|
626 |
+
'PaLM 2 API': emoji_good if st.session_state['has_key_palm2'] else emoji_bad,
|
627 |
'OpenAI API (Azure)': emoji_good if st.session_state['has_key_azure'] else emoji_bad,
|
628 |
}
|
629 |
for api_name, status in table.items():
|
|
|
838 |
'mapping': st.session_state['mapping'],
|
839 |
}
|
840 |
|
841 |
+
def refresh():
|
842 |
+
st.write('')
|
843 |
|
844 |
def upload_local_prompt_to_server(dir_prompt):
|
845 |
uploaded_file = st.file_uploader("Upload a custom prompt file", type=['yaml'])
|
|
|
1294 |
st.button("Start Processing", type='primary', disabled=True)
|
1295 |
# st.error(":heavy_exclamation_mark: Required API keys not set. Please visit the 'API Keys' tab and set the Google Vision OCR API key and at least one LLM key.")
|
1296 |
st.error(":heavy_exclamation_mark: Required API keys not set. Please set the API keys as 'Secrets' for your Hugging Face Space. Visit the 'Settings' tab at the top of the page.")
|
1297 |
+
st.button("Refresh", on_click=refresh)
|
1298 |
|
1299 |
with col_run_2:
|
1300 |
st.subheader('Run Tests', help="")
|
vouchervision/vouchervision_main.py
CHANGED
@@ -89,7 +89,7 @@ def voucher_vision(cfg_file_path, dir_home, path_custom_prompts, cfg_test, progr
|
|
89 |
space_saver(cfg, Dirs, logger)
|
90 |
|
91 |
if is_real_run:
|
92 |
-
progress_report.update_overall(f"Run Complete! :
|
93 |
|
94 |
for handler in logger.handlers[:]:
|
95 |
handler.close()
|
|
|
89 |
space_saver(cfg, Dirs, logger)
|
90 |
|
91 |
if is_real_run:
|
92 |
+
progress_report.update_overall(f"Run Complete! :)")
|
93 |
|
94 |
for handler in logger.handlers[:]:
|
95 |
handler.close()
|