mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-30 08:03:57 +00:00
added remove pytorch
This commit is contained in:
parent
587b3f0451
commit
66abfac334
5
app.py
5
app.py
@ -855,8 +855,11 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
|||||||
ASCIIColors.red("Couldn't install cuda toolkit")
|
ASCIIColors.red("Couldn't install cuda toolkit")
|
||||||
return jsonify({'status':False, "error": "Couldn't install cuda toolkit. Make sure you are running from conda environment"})
|
return jsonify({'status':False, "error": "Couldn't install cuda toolkit. Make sure you are running from conda environment"})
|
||||||
ASCIIColors.green("Cuda toolkit installed successfully")
|
ASCIIColors.green("Cuda toolkit installed successfully")
|
||||||
|
ASCIIColors.yellow("Removing pytorch")
|
||||||
|
res = subprocess.check_call(["pip","uninstall","torch", "torchvision", "torchaudio"])
|
||||||
|
ASCIIColors.green("PyTorch unstalled successfully")
|
||||||
ASCIIColors.yellow("Installing pytorch with cuda support")
|
ASCIIColors.yellow("Installing pytorch with cuda support")
|
||||||
res = subprocess.check_call(["pip","install","--upgrade","torch==2.0.1+cu117", "torchvision", "torchaudio", "--index-url", "https://download.pytorch.org/whl/cu117"])
|
res = subprocess.check_call(["pip","install","--upgrade","torch==2.0.1+cu117", "torchvision", "torchaudio", "--index-url", "https://download.pytorch.org/whl/cu117","no-cache"])
|
||||||
if res==0:
|
if res==0:
|
||||||
ASCIIColors.green("PyTorch installed successfully")
|
ASCIIColors.green("PyTorch installed successfully")
|
||||||
import torch
|
import torch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user