DeepLearning101
commited on
Commit
•
f9951fb
1
Parent(s):
b5b7374
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,18 @@ import json
|
|
6 |
from datasets import Dataset, DatasetDict, load_dataset, load_from_disk
|
7 |
from huggingface_hub import HfApi, HfFolder
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# 定義 CSS 樣式
|
10 |
custom_css = """
|
11 |
#title {
|
|
|
6 |
from datasets import Dataset, DatasetDict, load_dataset, load_from_disk
|
7 |
from huggingface_hub import HfApi, HfFolder
|
8 |
|
9 |
+
import subprocess
|
10 |
+
|
11 |
+
def upgrade_pip():
|
12 |
+
try:
|
13 |
+
subprocess.check_call([os.sys.executable, "-m", "pip", "install", "--upgrade", "pip"])
|
14 |
+
print("pip 升級成功")
|
15 |
+
except subprocess.CalledProcessError:
|
16 |
+
print("pip 升級失敗")
|
17 |
+
|
18 |
+
# 呼叫升級函數
|
19 |
+
upgrade_pip()
|
20 |
+
|
21 |
# 定義 CSS 樣式
|
22 |
custom_css = """
|
23 |
#title {
|