Spaces:
Runtime error
Runtime error
Commit
•
0e283b1
1
Parent(s):
70dc650
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ class VideoClassifier:
|
|
45 |
self.setup_gemini_model()
|
46 |
self.setup_paths()
|
47 |
self.hf_key = os.environ.get("HF_KEY", None)
|
48 |
-
self.
|
49 |
# self.whisper_model = whisper.load_model("base")
|
50 |
|
51 |
def setup_paths(self):
|
@@ -180,7 +180,7 @@ class VideoClassifier:
|
|
180 |
video_clip.close()
|
181 |
|
182 |
with open(temp_audio.name, 'rb') as audio_file:
|
183 |
-
transcription = self.
|
184 |
model="whisper-1",
|
185 |
file=audio_file
|
186 |
)
|
|
|
45 |
self.setup_gemini_model()
|
46 |
self.setup_paths()
|
47 |
self.hf_key = os.environ.get("HF_KEY", None)
|
48 |
+
self.chatgpt_client = OpenAI(api_key="sk-proj-KY1qI7zTpsUiJhMUHuNdT3BlbkFJLOjVnTUSpYJi87yUtSEI")
|
49 |
# self.whisper_model = whisper.load_model("base")
|
50 |
|
51 |
def setup_paths(self):
|
|
|
180 |
video_clip.close()
|
181 |
|
182 |
with open(temp_audio.name, 'rb') as audio_file:
|
183 |
+
transcription = self.chatgpt_client.audio.transcriptions.create(
|
184 |
model="whisper-1",
|
185 |
file=audio_file
|
186 |
)
|