Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -153,6 +153,15 @@ def main():
|
|
| 153 |
|
| 154 |
st.write(css, unsafe_allow_html=True)
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
|
| 157 |
if "conversation" not in st.session_state:
|
| 158 |
st.session_state.conversation = None
|
|
@@ -165,14 +174,6 @@ def main():
|
|
| 165 |
handle_userinput(user_question)
|
| 166 |
|
| 167 |
with st.sidebar:
|
| 168 |
-
# set huggingface hub token in st.text_input widget
|
| 169 |
-
# then hide the input
|
| 170 |
-
huggingface_token = st.text_input("Enter your HuggingFace Hub token", type="password")
|
| 171 |
-
#openai_api_key = st.text_input("Enter your OpenAI API key", type="password")
|
| 172 |
-
|
| 173 |
-
# set this key as an environment variable
|
| 174 |
-
os.environ["HUGGINGFACEHUB_API_TOKEN"] = huggingface_token
|
| 175 |
-
#os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 176 |
st.subheader("Your documents")
|
| 177 |
pdf_docs = st.file_uploader(
|
| 178 |
"Upload your PDFs here and click on 'Process'", accept_multiple_files=True
|
|
|
|
| 153 |
|
| 154 |
st.write(css, unsafe_allow_html=True)
|
| 155 |
|
| 156 |
+
# set huggingface hub token in st.text_input widget
|
| 157 |
+
# then hide the input
|
| 158 |
+
huggingface_token = st.text_input("Enter your HuggingFace Hub token", type="password")
|
| 159 |
+
#openai_api_key = st.text_input("Enter your OpenAI API key", type="password")
|
| 160 |
+
|
| 161 |
+
# set this key as an environment variable
|
| 162 |
+
os.environ["HUGGINGFACEHUB_API_TOKEN"] = huggingface_token
|
| 163 |
+
#os.environ["OPENAI_API_KEY"] = openai_api_key
|
| 164 |
+
|
| 165 |
|
| 166 |
if "conversation" not in st.session_state:
|
| 167 |
st.session_state.conversation = None
|
|
|
|
| 174 |
handle_userinput(user_question)
|
| 175 |
|
| 176 |
with st.sidebar:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
st.subheader("Your documents")
|
| 178 |
pdf_docs = st.file_uploader(
|
| 179 |
"Upload your PDFs here and click on 'Process'", accept_multiple_files=True
|