mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
upgraded code
This commit is contained in:
parent
97f237360b
commit
1534834cdc
@ -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")
|
||||
|
@ -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__(
|
||||
|
Loading…
Reference in New Issue
Block a user