Update subgen.py
This commit is contained in:
@@ -12,35 +12,13 @@ import io
|
|||||||
from array import array
|
from array import array
|
||||||
from typing import BinaryIO, Union, Any
|
from typing import BinaryIO, Union, Any
|
||||||
import random
|
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 import FastAPI, File, UploadFile, Query, Header, Body, Form, Request
|
||||||
from fastapi.responses import StreamingResponse, RedirectResponse
|
from fastapi.responses import StreamingResponse, RedirectResponse
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import stable_whisper
|
import stable_whisper
|
||||||
import requests
|
import requests
|
||||||
import av
|
import av
|
||||||
import ffmpeg
|
import ffmpeg-python
|
||||||
import whisper
|
import whisper
|
||||||
|
|
||||||
def convert_to_bool(in_bool):
|
def convert_to_bool(in_bool):
|
||||||
|
|||||||
Reference in New Issue
Block a user