Skip to content

Commit

Permalink
Update TENSOR_VERSION to "2.2.1" and add IS_MAC check
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Feb 23, 2024
1 parent 03d9f77 commit fbd08eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions transcribe_anything/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@
CUDA_AVAILABLE: Optional[bool] = None

# Set the versions
TENSOR_VERSION = "2.1.2"
TENSOR_VERSION = "2.2.1"
CUDA_VERSION = "cu121"
EXTRA_INDEX_URL = f"https://download.pytorch.org/whl/{CUDA_VERSION}"

IS_MAC = sys.platform == "darwin"


def get_environment() -> dict[str, Any]:
"""Returns the environment."""
venv_dir = HERE / "venv" / "whisper"
deps = [
"openai-whisper",
]
if has_nvidia_smi():
if not IS_MAC and has_nvidia_smi():
deps.append(
f"torch=={TENSOR_VERSION}+{CUDA_VERSION} --extra-index-url {EXTRA_INDEX_URL}"
)
Expand Down

0 comments on commit fbd08eb

Please sign in to comment.