Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,8 @@ import gradio as gr
|
|
| 2 |
import PyPDF2
|
| 3 |
import openai
|
| 4 |
|
| 5 |
-
# Set up the OpenAI client
|
| 6 |
-
client = openai.
|
| 7 |
|
| 8 |
def extract_text_from_pdf(pdf_file):
|
| 9 |
"""Extracts text from an uploaded PDF."""
|
|
|
|
| 2 |
import PyPDF2
|
| 3 |
import openai
|
| 4 |
|
| 5 |
+
# Set up the OpenAI client properly
|
| 6 |
+
client = openai.Client(api_key="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") # Use your new key here
|
| 7 |
|
| 8 |
def extract_text_from_pdf(pdf_file):
|
| 9 |
"""Extracts text from an uploaded PDF."""
|