🐍 Installation
Windows and Mac users can use [GUI installer](https://docs.conda.io/en/latest/miniconda.html) . Remember to accept adding conda to PATH
Linux or Windows Subsystem Linux (wsl) can do:
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory | |
git clone https://github.com/myshell-ai/OpenVoice | |
cd OpenVoice | |
git clone https://huggingface.co/myshell-ai/OpenVoice | |
cp -r OpenVoice/* . | |
pip install whisper pynput pyaudio | |
""" | |
from openai import OpenAI | |
import time |
#!/bin/bash | |
sudo apt update -y | |
sudo apt install git gcc make openssl libssl-dev \ | |
libbz2-dev libreadline-dev libsqlite3-dev zlib1g-dev \ | |
libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev \ | |
tk-dev libssl-dev openssl libffi-dev \ | |
-y | |
# install |
import json | |
import zlib | |
from typing import Any, Optional, Dict | |
import diskcache as dc | |
class DataCache: | |
def __init__( | |
self, | |
cache_path: str, |
from datetime import datetime | |
from uuid import UUID, uuid4 | |
from typing import Literal, Optional, Union | |
from pydantic import BaseModel, Field, ValidationError, validator, constr, confloat | |
class HouseDataValidation(BaseModel): | |
id: Union[int, UUID] = Field(default_factory=uuid4) | |
kind: Literal["villa", "apartment", "townhouse"] |
from pathlib import Path | |
from PIL import Image | |
# get all png images from folder `gotoslides` | |
SLIDES_IMAGES = Path("gotoslides").glob("*.png") | |
# maybe use a generator | convert RGB (since its png) | |
images = [Image.open(image).convert("RGB") for image in SLIDES_IMAGES] | |
with open("gotoslides.pdf", "wb") as pdf_file: |
# Using pyPDF2 and requests(or httpx) to extract PDF data | |
import io | |
import requests | |
import PyPDF2 | |
# my favorite Kierkegard's PDF book | |
URI = "https://antilogicalism.com/wp-content/uploads/2017/07/thesicknessuntodeath.pdf" | |
headers = {"user-agent": "Prayson W. Daniel: prayson*at*.com"} |
Windows and Mac users can use [GUI installer](https://docs.conda.io/en/latest/miniconda.html) . Remember to accept adding conda to PATH
Linux or Windows Subsystem Linux (wsl) can do: