Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,12 +3,15 @@ import PyPDF2
|
|
3 |
import os
|
4 |
import keyfile
|
5 |
from openai import OpenAI
|
6 |
-
# Built a client for OpenAI
|
7 |
-
client = OpenAI()
|
8 |
|
9 |
# here we are calling our API for openAI
|
10 |
os.environ["OPENAI_API_KEY"] = keyfile.OPENAI_API_KEY
|
11 |
|
|
|
|
|
|
|
|
|
|
|
12 |
# We need to upload the file
|
13 |
def extract_text(pdfPath):
|
14 |
reader = PyPDF2.PdfReader(pdfPath)
|
|
|
3 |
import os
|
4 |
import keyfile
|
5 |
from openai import OpenAI
|
|
|
|
|
6 |
|
7 |
# here we are calling our API for openAI
|
8 |
os.environ["OPENAI_API_KEY"] = keyfile.OPENAI_API_KEY
|
9 |
|
10 |
+
# Built a client for OpenAI
|
11 |
+
client = OpenAI()
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
# We need to upload the file
|
16 |
def extract_text(pdfPath):
|
17 |
reader = PyPDF2.PdfReader(pdfPath)
|