Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,9 @@ from openai import OpenAI
|
|
12 |
# Load Whisper model
|
13 |
whisper_model = whisper.load_model("base")
|
14 |
|
|
|
|
|
|
|
15 |
# Load Groq API key
|
16 |
GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
|
17 |
|
@@ -21,6 +24,7 @@ client = OpenAI(
|
|
21 |
base_url="https://api.groq.com/openai/v1"
|
22 |
)
|
23 |
|
|
|
24 |
def extract_text_from_file(file):
|
25 |
if file.name.endswith(".pdf"):
|
26 |
with pdfplumber.open(file.name) as pdf:
|
|
|
12 |
# Load Whisper model
|
13 |
whisper_model = whisper.load_model("base")
|
14 |
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
# Load Groq API key
|
19 |
GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
|
20 |
|
|
|
24 |
base_url="https://api.groq.com/openai/v1"
|
25 |
)
|
26 |
|
27 |
+
|
28 |
def extract_text_from_file(file):
|
29 |
if file.name.endswith(".pdf"):
|
30 |
with pdfplumber.open(file.name) as pdf:
|