update
This commit is contained in:
parent
9bc3b5c8ca
commit
10077cf4c5
@ -142,26 +142,34 @@ if missing:
|
|||||||
#################################################################################################################
|
#################################################################################################################
|
||||||
|
|
||||||
for missing_module in missing:
|
for missing_module in missing:
|
||||||
msg(f"{BRK}!")
|
if not missing_module=="transformers==2.3.0":
|
||||||
log("SHELLED",f"INSTALLING MISSING PYTHON MODULE: {str(missing_module).upper()}",4)
|
msg(f"{BRK}!")
|
||||||
msg(f"!{BRK}!")
|
log("SHELLED",f"INSTALLING MISSING PYTHON MODULE: {str(missing_module).upper()}",4)
|
||||||
run_cmd(f'{sys.executable} -um pip install {missing_module}')
|
msg(f"!{BRK}!")
|
||||||
if missing_module=='asyncio':
|
run_cmd(f'{sys.executable} -um pip install {missing_module}')
|
||||||
exec(f'import {missing_module}')
|
if missing_module=='asyncio':
|
||||||
elif missing_module=="sklearn":
|
exec(f'import {missing_module}')
|
||||||
import sklearn
|
elif missing_module=="sklearn":
|
||||||
elif missing_module=="numpy":
|
import sklearn
|
||||||
import numpy as np
|
elif missing_module=="numpy":
|
||||||
elif missing_module=="requests":
|
import numpy as np
|
||||||
exec(f'import {missing_module}')
|
elif missing_module=="requests":
|
||||||
elif missing_module=="torch":
|
exec(f'import {missing_module}')
|
||||||
exec(f'import {missing_module}')
|
elif missing_module=="torch":
|
||||||
import torch.nn.functional as F
|
exec(f'import {missing_module}')
|
||||||
elif missing_module=="tqdm":
|
import torch.nn.functional as F
|
||||||
from tqdm import tqdm
|
elif missing_module=="tqdm":
|
||||||
elif missing_module=="transformers==2.3.0":
|
from tqdm import tqdm
|
||||||
from transformers import GPT2Config, GPT2LMHeadModel, GPT2Tokenizer
|
|
||||||
|
#################################################################################################################
|
||||||
|
#################################################################################################################
|
||||||
|
|
||||||
|
if "transformers==2.3.0" in missing:
|
||||||
|
from transformers import GPT2Config, GPT2LMHeadModel, GPT2Tokenizer
|
||||||
|
|
||||||
|
#####################################################################################################################
|
||||||
|
#####################################################################################################################
|
||||||
|
|
||||||
if not missing:
|
if not missing:
|
||||||
import asyncio
|
import asyncio
|
||||||
import sklearn
|
import sklearn
|
||||||
|
Loading…
Reference in New Issue
Block a user