Spaces:
Running
Running
phyloforfun
commited on
Commit
·
aaf86cc
1
Parent(s):
ae3d41c
file upload gallery
Browse files
app.py
CHANGED
@@ -609,10 +609,10 @@ def image_to_base64(img):
|
|
609 |
# st.markdown(css, unsafe_allow_html=True)
|
610 |
|
611 |
def show_available_APIs():
|
612 |
-
st.session_state['has_key_openai'] = os.getenv('OPENAI_API_KEY') is not None
|
613 |
-
st.session_state['has_key_google_OCR'] = os.getenv('GOOGLE_APPLICATION_CREDENTIALS') is not None
|
614 |
-
st.session_state['has_key_palm2'] = os.getenv('PALM_API_KEY') is not None
|
615 |
-
st.session_state['has_key_azure'] = os.getenv('AZURE_API_KEY') is not None
|
616 |
|
617 |
emoji_good = ":heavy_check_mark:"
|
618 |
emoji_bad = ":x:"
|
|
|
609 |
# st.markdown(css, unsafe_allow_html=True)
|
610 |
|
611 |
def show_available_APIs():
|
612 |
+
st.session_state['has_key_openai'] = (os.getenv('OPENAI_API_KEY') is not None) and (os.getenv('OPENAI_API_KEY') != '')
|
613 |
+
st.session_state['has_key_google_OCR'] = (os.getenv('GOOGLE_APPLICATION_CREDENTIALS') is not None) and (os.getenv('GOOGLE_APPLICATION_CREDENTIALS') != '')
|
614 |
+
st.session_state['has_key_palm2'] = (os.getenv('PALM_API_KEY') is not None) and (os.getenv('PALM_API_KEY') != '')
|
615 |
+
st.session_state['has_key_azure'] = (os.getenv('AZURE_API_KEY') is not None) and (os.getenv('AZURE_API_KEY') != '')
|
616 |
|
617 |
emoji_good = ":heavy_check_mark:"
|
618 |
emoji_bad = ":x:"
|