Spaces:
Sleeping
Sleeping
add .name
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ class GUI:
|
|
16 |
#load pdf and create all embedings
|
17 |
def pdf_init(self, api_key, pdf_path):
|
18 |
openai.api_key = api_key
|
19 |
-
pdf_reader = PdfReader(pdf_path)
|
20 |
paper = Paper(pdf_reader)
|
21 |
all_texts = paper.get_texts()
|
22 |
self.all_embedding, self.tokens = create_embeddings(all_texts)
|
|
|
16 |
#load pdf and create all embedings
|
17 |
def pdf_init(self, api_key, pdf_path):
|
18 |
openai.api_key = api_key
|
19 |
+
pdf_reader = PdfReader(pdf_path.name)
|
20 |
paper = Paper(pdf_reader)
|
21 |
all_texts = paper.get_texts()
|
22 |
self.all_embedding, self.tokens = create_embeddings(all_texts)
|