Update subgen.py

This commit is contained in:
McCloudS
2024-01-28 11:40:50 -07:00
committed by GitHub
parent 5be7068bf5
commit 516f58d62c

View File

@@ -12,35 +12,13 @@ import io
from array import array
from typing import BinaryIO, Union, Any
import random
# List of packages to install
packages_to_install = [
'numpy',
'stable-ts',
'fastapi',
'requests',
'faster-whisper',
'uvicorn',
'python-multipart',
'whisper',
# Add more packages as needed
]
for package in packages_to_install:
print(f"Installing {package}...")
try:
subprocess.run(['pip3', 'install', package], check=True)
print(f"{package} has been successfully installed.")
except subprocess.CalledProcessError as e:
print(f"Failed to install {package}: {e}")
from fastapi import FastAPI, File, UploadFile, Query, Header, Body, Form, Request
from fastapi.responses import StreamingResponse, RedirectResponse
import numpy as np
import stable_whisper
import requests
import av
import ffmpeg
import ffmpeg-python
import whisper
def convert_to_bool(in_bool):