File size: 481 Bytes
73cfd62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gensim.downloader as api
import os
import whisper
import torch

# LOAD THE WORD2VEC MODEL
word_2_vec = api.load('word2vec-google-news-300')

# SAVE THE WORD2VEC MODEL LOCALLY
word_2_vec.save("word2vec-google-news-300.model")

# LOAD THE WHISPER MODEL
model = whisper.load_model("tiny")

# SAVE THE WHISPER MODEL LOCALLY USING TORCH
save_path = "whisper_tiny_model.pt"  # CHOOSE YOUR DESIRED FILE NAME
torch.save(model.state_dict(), save_path)  # SAVE MODEL STATE DICTIONARY