Spaces:
Sleeping
Sleeping
Update rag_search.py
Browse files- rag_search.py +4 -1
rag_search.py
CHANGED
|
@@ -415,6 +415,9 @@ if 'api_key_valid' not in st.session_state:
|
|
| 415 |
if 'previous_api_key' not in st.session_state:
|
| 416 |
st.session_state['previous_api_key'] = None
|
| 417 |
|
|
|
|
|
|
|
|
|
|
| 418 |
|
| 419 |
def load_data(file_path, key='df'):
|
| 420 |
return pd.read_hdf(file_path, key=key)
|
|
@@ -436,7 +439,7 @@ if datasett is not None:
|
|
| 436 |
label='Select columns to analyze',
|
| 437 |
options=st.session_state['parsed_responses'].columns)
|
| 438 |
with col2:
|
| 439 |
-
COHERE_KEY = st.text_input('Cohere APIs Key',
|
| 440 |
|
| 441 |
question = st.text_input("Ask a question")
|
| 442 |
|
|
|
|
| 415 |
if 'previous_api_key' not in st.session_state:
|
| 416 |
st.session_state['previous_api_key'] = None
|
| 417 |
|
| 418 |
+
OPENAI_KEY = st.secrets["OPENAI_KEY"]
|
| 419 |
+
GEMINI_KEY = st.secrets["GEMINI_KEY"]
|
| 420 |
+
COHERE_KEY = st.secrets["COHERE_KEY"]
|
| 421 |
|
| 422 |
def load_data(file_path, key='df'):
|
| 423 |
return pd.read_hdf(file_path, key=key)
|
|
|
|
| 439 |
label='Select columns to analyze',
|
| 440 |
options=st.session_state['parsed_responses'].columns)
|
| 441 |
with col2:
|
| 442 |
+
COHERE_KEY = st.text_input('Cohere APIs Key', COHERE_KEY, type='password', help="Enter your Cohere API key")
|
| 443 |
|
| 444 |
question = st.text_input("Ask a question")
|
| 445 |
|