Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,13 +18,15 @@ nltk.download('punkt')
|
|
| 18 |
with st.sidebar:
|
| 19 |
st.title(':orange_book: BinDoc GmbH')
|
| 20 |
|
| 21 |
-
# API key
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 27 |
st.warning('API key is required to proceed.')
|
|
|
|
| 28 |
|
| 29 |
st.markdown("Experience the future of document interaction with the revolutionary")
|
| 30 |
st.markdown("**BinDocs Chat App**.")
|
|
|
|
| 18 |
with st.sidebar:
|
| 19 |
st.title(':orange_book: BinDoc GmbH')
|
| 20 |
|
| 21 |
+
# Securely store the API key
|
| 22 |
+
st.secret("OPENAI_API_KEY")
|
| 23 |
+
|
| 24 |
+
# Retrieve the API key from st.secrets
|
| 25 |
+
api_key = st.secrets.get("OPENAI_API_KEY")
|
| 26 |
+
|
| 27 |
+
if not api_key:
|
| 28 |
st.warning('API key is required to proceed.')
|
| 29 |
+
st.stop() # Stop the app if the API key is not provided
|
| 30 |
|
| 31 |
st.markdown("Experience the future of document interaction with the revolutionary")
|
| 32 |
st.markdown("**BinDocs Chat App**.")
|