Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
llm-bootcamp-projects
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zaid
llm-bootcamp-projects
Commits
bd8f91ae
Commit
bd8f91ae
authored
Sep 21, 2023
by
zaid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final commints
parent
4673e4d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
app.py
Chat with your PDF/app.py
+2
-3
No files found.
Chat with your PDF/app.py
View file @
bd8f91ae
...
...
@@ -25,7 +25,7 @@ def main():
st
.
session_state
.
answer
=
[]
st
.
header
(
"Chat with
your Indexed PDFs
"
)
st
.
header
(
"Chat with
multiple PDFs :books:
"
)
resonse_container
,
container
=
st
.
container
(),
st
.
container
()
with
container
:
...
...
@@ -41,7 +41,7 @@ def main():
os
.
environ
[
'OPENAI_API_KEY'
]
=
OPENAI_API_KEY
st
.
subheader
(
"Your documents"
)
pdf_docs
=
st
.
file_uploader
(
"Upload your PDFs here and click on 'Process'"
,
accept_multiple_files
=
True
,
type
=
[
'pdf'
]
)
"Upload your PDFs here and click on 'Process'"
,
accept_multiple_files
=
True
)
if
st
.
button
(
"Process"
):
with
st
.
spinner
(
"Processing"
):
# get pdf text
...
...
@@ -91,7 +91,6 @@ def get_vectorstore(text_chunks):
vectorstore
=
FAISS
.
from_texts
(
texts
=
text_chunks
,
embedding
=
embeddings
)
return
vectorstore
def
get_conversation_chain
(
vectorstore
):
llm
=
ChatOpenAI
()
memory
=
ConversationBufferMemory
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment