Doesn't run pip when already installed

pull/7/head
Imrayya 2023-01-11 17:55:02 +01:00
parent db93f06a21
commit 33683c21ea
1 changed files with 4 additions and 1 deletions

View File

@ -1,2 +1,5 @@
import launch
launch.run_pip("install --upgrade transformers", "Requirment of Prompt-Maker")
if not launch.is_installed("transformers"):
launch.run_pip("install --upgrade transformers", "Requirement of Prompt-Maker")
if not launch.is_installed("torch"):
launch.run_pip("install --upgrade torch", "Requirement of Prompt-Maker")