Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,14 @@
|
|
1 |
import os,sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
from huggingface_hub import HfApi
|
3 |
from dotenv import load_dotenv
|
4 |
|
@@ -12,14 +22,6 @@ if not HF_TOKEN:
|
|
12 |
os.environ["HUGGINGFACE_TOKEN"] = HF_TOKEN
|
13 |
os.environ["TRANSFORMERS_CACHE"] = "/tmp/transformers_cache"
|
14 |
|
15 |
-
# install required packages
|
16 |
-
os.system('pip install -q transformers')
|
17 |
-
os.system('pip install -q plotly')
|
18 |
-
os.system('pip install -q matplotlib')
|
19 |
-
os.system('pip install dgl==1.0.2+cu116 -f https://data.dgl.ai/wheels/cu116/repo.html')
|
20 |
-
os.environ["DGLBACKEND"] = "pytorch"
|
21 |
-
print('Modules installed')
|
22 |
-
|
23 |
# 필수 라이브러리 임포트
|
24 |
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
25 |
from datasets import load_dataset
|
|
|
1 |
import os,sys
|
2 |
+
|
3 |
+
# install required packages
|
4 |
+
os.system('pip install -q python-dotenv') # python-dotenv 설치 추가
|
5 |
+
os.system('pip install -q transformers')
|
6 |
+
os.system('pip install -q plotly')
|
7 |
+
os.system('pip install -q matplotlib')
|
8 |
+
os.system('pip install dgl==1.0.2+cu116 -f https://data.dgl.ai/wheels/cu116/repo.html')
|
9 |
+
os.environ["DGLBACKEND"] = "pytorch"
|
10 |
+
print('Modules installed')
|
11 |
+
|
12 |
from huggingface_hub import HfApi
|
13 |
from dotenv import load_dotenv
|
14 |
|
|
|
22 |
os.environ["HUGGINGFACE_TOKEN"] = HF_TOKEN
|
23 |
os.environ["TRANSFORMERS_CACHE"] = "/tmp/transformers_cache"
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
# 필수 라이브러리 임포트
|
26 |
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
27 |
from datasets import load_dataset
|