-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathiris_script.py
More file actions
30 lines (20 loc) · 756 Bytes
/
Copy pathiris_script.py
File metadata and controls
30 lines (20 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import iris
from transformers import pipeline
#from iris import ipm
#assert ipm('load /home/irisowner/dev -v')
# switch namespace to the %SYS namespace
iris.system.Process.SetNamespace("%SYS")
# set credentials to not expire
iris.cls('Security.Users').UnExpireUserPasswords("*")
# switch namespace to IRISAPP built by merge.cpf
iris.system.Process.SetNamespace("IRISAPP")
import spacy.cli
import nltk
spacy.cli.download("en_core_web_sm")
nltk.download('punkt')
#init Sentimental analysis pipeline
classifier = pipeline('sentiment-analysis')
#init GPT2 text generation model
classifier = pipeline('text-generation', model = 'gpt2')
# load ipm package listed in module.xml
#iris.cls('%ZPM.PackageManager').Shell("load /home/irisowner/dev -v")