Skip to content

Commit

Permalink
document loader bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
melih-unsal committed Sep 20, 2023
1 parent 5b2802b commit 27a084c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions demogpt/chains/prompts/task_list/ui_input_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
temp_file.write(uploaded_file.read())
{variable} = temp_file.name # it shows the file path
else:
{variable} = ''
Suppose that, streamlit has been imported by "import streamlit as st" so you don't need to import it.
Here is the part of the code that you are supposed to continue:
Expand Down
1 change: 0 additions & 1 deletion demogpt/chains/task_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def docLoad(cls, task, code_snippets):
def stringToDoc(cls, task, code_snippets):
argument = task["input_key"]
variable = task["output_key"]
code = f'{variable} = "".join([doc.page_content for doc in {argument}])'
code = f"""
from langchain.docstore.document import Document
{variable} = [Document(page_content={argument}, metadata={{'source': 'local'}})]
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ openai = "*"
python-dotenv = "*"
unstructured = "*"
pdf2image = "*"
pdfminer = "*"
pdfminer-six = "*"

[tool.poetry.dev-dependencies]
Expand Down

0 comments on commit 27a084c

Please # to comment.