Create lib.py
Browse files
lib.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
print("\x1b[0;32mCreated by Riky Ripaldo")
|
3 |
+
print("Downloading Library...")
|
4 |
+
|
5 |
+
os.system("pip3 install --upgrade pip")
|
6 |
+
try:
|
7 |
+
import torch
|
8 |
+
except ModuleNotFoundError:
|
9 |
+
os.system("pip3 install torch")
|
10 |
+
|
11 |
+
try:
|
12 |
+
import nltk
|
13 |
+
except ModuleNotFoundError:
|
14 |
+
os.system("pip3 install nltk")
|
15 |
+
|
16 |
+
try:
|
17 |
+
import transformers
|
18 |
+
except ModuleNotFoundError:
|
19 |
+
os.system("pip3 install transformers")
|
20 |
+
|
21 |
+
print("\x1b[0;93mDownloading Library Success")
|