This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RVC-Mangio | |
https://github.com/Mangio621/Mangio-RVC-Fork/releases | |
Google Doc for MacOS Install Instructions | |
https://docs.google.com/document/d/1KKKE7hoyGXMw-Lg0JWx16R8xz3OfxADjwEYJTqzDO1k/edit#heading=h.8vqd8m4fh76q | |
Voice Models | |
https://voice-models.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sentence_transformers import SentenceTransformer | |
from sklearn.cluster import KMeans | |
embedder = SentenceTransformer('paraphrase-multilingual-mpnet-base-v2') | |
#embedder = SentenceTransformer('all-MiniLM-L6-v2') | |
corpus = tfidf_sum.index.to_list() | |
corpus_embeddings = embedder.encode(corpus) | |
# Perform kmean clustering | |
num_clusters = 8 | |
clustering_model = KMeans(n_clusters=num_clusters, random_state=42, init='k-means++') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda create -n my_custom_python_39 python=3.9 -y | |
cd ~/SageMaker | |
source activate my_custom_python_39 | |
pip install virtualenv | |
virtualenv my_custom_python_39_venv | |
conda deactivate | |
source my_custom_python_39_venv/bin/activate | |
pip install -r <your_project_folder>/requirements.txt | |
pip install ipykernel | |
python -m ipykernel install --user --name=my_custom_python_39 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda create -n my_custom_python_39 python=3.9 -y | |
cd ~/SageMaker | |
source activate my_custom_python_39 | |
pip install virtualenv | |
virtualenv my_custom_python_39_venv | |
conda deactivate | |
source my_custom_python_39_venv/bin/activate | |
pip install ipykernel -y | |
python -m ipykernel install --user --name=my_custom_python_39 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove URLs | |
text_clean = [re.sub(r'http\S+', '', t) for t in text] | |
# Remove new lines \n | |
text_clean= [t.strip().replace('\n', ' ') for t in text_clean] | |
# Remove emails | |
text_clean = [re.sub(r'[\w\.-]+@[\w\.-]+', '', t) for t in text_clean] | |
# Remove single quotes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from sklearn.model_selection import train_test_split | |
# IMDB Dataset can be found here | |
# wget http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz | |
# tar -xf aclImdb_v1.tar.gz | |
def read_imdb_split(split_dir): | |
split_dir = Path(split_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from sklearn.model_selection import train_test_split | |
from transformers import DistilBertTokenizerFast | |
import torch | |
from transformers import DistilBertForSequenceClassification, Trainer, TrainingArguments | |
import torch.nn.functional as F | |
from sklearn.metrics import accuracy_score, precision_recall_fscore_support | |
# IMDB Dataset can be found here | |
# wget http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" enable syntax highlighting | |
syntax enable | |
" show line numbers | |
set number | |
" set tabs to have 4 spaces | |
set ts=4 | |
" indent when moving to the next line while writing code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
total_qns = 0 | |
rootdir = '.' | |
for subdir, dirs, files in os.walk(rootdir): | |
for file in files: | |
path = os.path.join(subdir, file) | |
print(path) | |
if path.endswith('.xlsx'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import urllib.request | |
from nltk.corpus import words | |
punctuation = set(string.punctuation) | |
def remove_punc(str): | |
return ''.join(c for c in str if c not in punctuation) | |
total_count = 0 |
NewerOlder