Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +4 -4
src/streamlit_app.py
CHANGED
|
@@ -36,7 +36,7 @@ def get_api_credentials():
|
|
| 36 |
@st.cache_resource
|
| 37 |
def get_ai_client():
|
| 38 |
"""Initialize Together AI client"""
|
| 39 |
-
_, together_key, _ = get_api_credentials()
|
| 40 |
if not together_key:
|
| 41 |
st.error("Together AI API key not found. Please configure it in the secrets.")
|
| 42 |
return None
|
|
@@ -334,16 +334,16 @@ def main():
|
|
| 334 |
st.write("*At your service! Allow me to curate the perfect streaming entertainment for you.*")
|
| 335 |
|
| 336 |
# Check API credentials
|
| 337 |
-
api_token, together_key,
|
| 338 |
|
| 339 |
if not together_key:
|
| 340 |
st.error("⚠️ Together AI API key not configured!")
|
| 341 |
st.info("Please set your TOGETHER_API_KEY in the Hugging Face Spaces secrets.")
|
| 342 |
st.stop()
|
| 343 |
|
| 344 |
-
if not api_token:
|
| 345 |
st.error("⚠️ NocoDB credentials not configured!")
|
| 346 |
-
st.info("Please set NOCODB_API_TOKEN in the Hugging Face Spaces secrets.")
|
| 347 |
st.stop()
|
| 348 |
|
| 349 |
# Initialize AI client
|
|
|
|
| 36 |
@st.cache_resource
|
| 37 |
def get_ai_client():
|
| 38 |
"""Initialize Together AI client"""
|
| 39 |
+
_, together_key, _, _ = get_api_credentials()
|
| 40 |
if not together_key:
|
| 41 |
st.error("Together AI API key not found. Please configure it in the secrets.")
|
| 42 |
return None
|
|
|
|
| 334 |
st.write("*At your service! Allow me to curate the perfect streaming entertainment for you.*")
|
| 335 |
|
| 336 |
# Check API credentials
|
| 337 |
+
api_token, together_key, content_endpoint, similarity_endpoints = get_api_credentials()
|
| 338 |
|
| 339 |
if not together_key:
|
| 340 |
st.error("⚠️ Together AI API key not configured!")
|
| 341 |
st.info("Please set your TOGETHER_API_KEY in the Hugging Face Spaces secrets.")
|
| 342 |
st.stop()
|
| 343 |
|
| 344 |
+
if not api_token or not content_endpoint:
|
| 345 |
st.error("⚠️ NocoDB credentials not configured!")
|
| 346 |
+
st.info("Please set NOCODB_API_TOKEN and NOCODB_CONTENT_ENDPOINT in the Hugging Face Spaces secrets.")
|
| 347 |
st.stop()
|
| 348 |
|
| 349 |
# Initialize AI client
|