Update Gpt4oDemo.py
Browse files- Gpt4oDemo.py +2 -1
Gpt4oDemo.py
CHANGED
|
@@ -12,6 +12,7 @@ import time
|
|
| 12 |
import base64
|
| 13 |
import whisperx
|
| 14 |
import gc
|
|
|
|
| 15 |
from dotenv import load_dotenv
|
| 16 |
|
| 17 |
load_dotenv()
|
|
@@ -30,7 +31,7 @@ client = openai.OpenAI(
|
|
| 30 |
MODEL="gpt-4o"
|
| 31 |
|
| 32 |
# Whisperx config
|
| 33 |
-
device = "
|
| 34 |
batch_size = 16 # reduce if low on GPU mem
|
| 35 |
compute_type = "int8" # change to "int8" if low on GPU mem (may reduce accuracy)
|
| 36 |
from faster_whisper.transcribe import TranscriptionOptions
|
|
|
|
| 12 |
import base64
|
| 13 |
import whisperx
|
| 14 |
import gc
|
| 15 |
+
from moviepy.editor import VideoFileClip
|
| 16 |
from dotenv import load_dotenv
|
| 17 |
|
| 18 |
load_dotenv()
|
|
|
|
| 31 |
MODEL="gpt-4o"
|
| 32 |
|
| 33 |
# Whisperx config
|
| 34 |
+
device = "cuda"
|
| 35 |
batch_size = 16 # reduce if low on GPU mem
|
| 36 |
compute_type = "int8" # change to "int8" if low on GPU mem (may reduce accuracy)
|
| 37 |
from faster_whisper.transcribe import TranscriptionOptions
|