upgraded code

This commit is contained in:
Saifeddine ALOUI 2024-09-27 22:09:20 +02:00
parent 97f237360b
commit 1534834cdc
2 changed files with 10 additions and 4 deletions

View File

@ -42,7 +42,12 @@ def add_events(sio:socketio):
@sio.on('uninstall_model')
def uninstall_model(sid, data):
sanitize_path(data['path'])
path:str = data['path']
if path.startswith("http://"):
path = path[7:]
if path.startswith("https://"):
path = path[8:]
sanitize_path(path)
model_path = os.path.realpath(data['path'])
model_type:str=data.get("type","gguf")

View File

@ -34,9 +34,10 @@ except:
ASCIIColors.red("Couldn't install ffmpeg")
pm.install("git+https://github.com/openai/whisper.git")
import whisper
try:
import whisper
except:
pm.install("openai-whisper")
class LollmsWhisper(LollmsSTT):
def __init__(