Spaces:
Runtime error
Runtime error
Commit
Β·
c49ec9a
1
Parent(s):
1409f1c
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,6 +71,7 @@ if load_button:
|
|
| 71 |
#********SIDE BAR Funtionality ended*******
|
| 72 |
|
| 73 |
#Captures User Inputs
|
|
|
|
| 74 |
prompt = st.text_input('How can I help you my friend β',key="prompt") # The box for the text prompt
|
| 75 |
document_count = st.slider('No.Of links to return π - (0 LOW || 5 HIGH)', 0, 5, 2,step=1)
|
| 76 |
|
|
@@ -81,7 +82,7 @@ if submit:
|
|
| 81 |
#Proceed only if API keys are provided
|
| 82 |
if st.session_state['Website_URL'] !="" and st.session_state['HuggingFace_API_Key'] !="" and st.session_state['Pinecone_ENV'] !="" and st.session_state['Pinecone_API_Key']!="" and st.session_state['API_Key'] != '':
|
| 83 |
|
| 84 |
-
|
| 85 |
|
| 86 |
q = st.text_input('Ask a question about the content of your file:')
|
| 87 |
if q: # if the user entered a question and hit enter
|
|
|
|
| 71 |
#********SIDE BAR Funtionality ended*******
|
| 72 |
|
| 73 |
#Captures User Inputs
|
| 74 |
+
api_key = st.session_state['API_Key'] = st.text_input("Paste in your OPENAI API key?", type="password")
|
| 75 |
prompt = st.text_input('How can I help you my friend β',key="prompt") # The box for the text prompt
|
| 76 |
document_count = st.slider('No.Of links to return π - (0 LOW || 5 HIGH)', 0, 5, 2,step=1)
|
| 77 |
|
|
|
|
| 82 |
#Proceed only if API keys are provided
|
| 83 |
if st.session_state['Website_URL'] !="" and st.session_state['HuggingFace_API_Key'] !="" and st.session_state['Pinecone_ENV'] !="" and st.session_state['Pinecone_API_Key']!="" and st.session_state['API_Key'] != '':
|
| 84 |
|
| 85 |
+
|
| 86 |
|
| 87 |
q = st.text_input('Ask a question about the content of your file:')
|
| 88 |
if q: # if the user entered a question and hit enter
|