Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,25 +20,17 @@ with st.sidebar:
|
|
| 20 |
|
| 21 |
st.markdown("**BinDocs Chat App**.")
|
| 22 |
|
| 23 |
-
|
| 24 |
st.markdown("Harnessing the power of a Large Language Model and AI technology,")
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
st.markdown("this innovative platform redefines PDF engagement,")
|
| 29 |
|
| 30 |
st.markdown("enabling dynamic conversations that bridge the gap between")
|
| 31 |
st.markdown("human and machine intelligence.")
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
add_vertical_space(3) # Add more vertical space between text blocks
|
| 36 |
st.write('Made with ❤️ by Anne')
|
| 37 |
-
|
| 38 |
|
| 39 |
openai_api_key = st.text_input("Enter your OpenAI API key:")
|
| 40 |
-
pdf_path =
|
| 41 |
-
|
| 42 |
|
| 43 |
def load_pdf(file_path):
|
| 44 |
pdf_reader = PdfReader(file_path)
|
|
@@ -67,7 +59,6 @@ def load_pdf(file_path):
|
|
| 67 |
return VectorStore
|
| 68 |
|
| 69 |
|
| 70 |
-
|
| 71 |
def load_chatbot(openai_api_key):
|
| 72 |
openai_config = {
|
| 73 |
"api_key": openai_api_key
|
|
|
|
| 20 |
|
| 21 |
st.markdown("**BinDocs Chat App**.")
|
| 22 |
|
|
|
|
| 23 |
st.markdown("Harnessing the power of a Large Language Model and AI technology,")
|
|
|
|
|
|
|
|
|
|
| 24 |
st.markdown("this innovative platform redefines PDF engagement,")
|
| 25 |
|
| 26 |
st.markdown("enabling dynamic conversations that bridge the gap between")
|
| 27 |
st.markdown("human and machine intelligence.")
|
| 28 |
|
|
|
|
|
|
|
| 29 |
add_vertical_space(3) # Add more vertical space between text blocks
|
| 30 |
st.write('Made with ❤️ by Anne')
|
|
|
|
| 31 |
|
| 32 |
openai_api_key = st.text_input("Enter your OpenAI API key:")
|
| 33 |
+
pdf_path = None # Initialize pdf_path as None
|
|
|
|
| 34 |
|
| 35 |
def load_pdf(file_path):
|
| 36 |
pdf_reader = PdfReader(file_path)
|
|
|
|
| 59 |
return VectorStore
|
| 60 |
|
| 61 |
|
|
|
|
| 62 |
def load_chatbot(openai_api_key):
|
| 63 |
openai_config = {
|
| 64 |
"api_key": openai_api_key
|