Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,9 +2,10 @@ import streamlit as st
|
|
| 2 |
import PyPDF2
|
| 3 |
import openai
|
| 4 |
import os
|
|
|
|
| 5 |
|
| 6 |
# here we are calling our API for openAI
|
| 7 |
-
os.environ["OPENAI_API_KEY"] =
|
| 8 |
|
| 9 |
# We need to upload the file
|
| 10 |
def extract_text(pdfPath):
|
|
|
|
| 2 |
import PyPDF2
|
| 3 |
import openai
|
| 4 |
import os
|
| 5 |
+
import keyfile
|
| 6 |
|
| 7 |
# here we are calling our API for openAI
|
| 8 |
+
os.environ["OPENAI_API_KEY"] = keyfile.OPENAI_API_KEY
|
| 9 |
|
| 10 |
# We need to upload the file
|
| 11 |
def extract_text(pdfPath):
|