wondervictor commited on
Commit
dec8cc6
·
verified ·
1 Parent(s): 44698e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -8,18 +8,19 @@ import os
8
 
9
  import subprocess
10
 
11
- def install_requirements():
12
- try:
13
- # subprocess.run(['pip', 'install', 'torch==2.1.2+cu118', '--extra-index-url', 'https://download.pytorch.org/whl/cu118'], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
14
- subprocess.run(['pip', 'show', 'torch'], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
15
- # result = subprocess.run(['pip', 'install', '-r', 'requirements.txt'], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
16
- print("安装成功!")
17
- # print("输出:", result.stdout.decode('utf-8'))
18
- except subprocess.CalledProcessError as e:
19
- print("安装失败!")
20
- print("错误:", e.stderr.decode('utf-8'))
21
 
22
- install_requirements()
 
23
 
24
  # hf_hub_download(repo_id='wondervictor/ControlAR',
25
  # filename='canny_MR.safetensors',
 
8
 
9
  import subprocess
10
 
11
+ # def install_requirements():
12
+ # try:
13
+ # # subprocess.run(['pip', 'install', 'torch==2.1.2+cu118', '--extra-index-url', 'https://download.pytorch.org/whl/cu118'], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
14
+ # subprocess.run(['pip', 'show', 'torch'], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
15
+ # # result = subprocess.run(['pip', 'install', '-r', 'requirements.txt'], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
16
+ # print("安装成功!")
17
+ # # print("输出:", result.stdout.decode('utf-8'))
18
+ # except subprocess.CalledProcessError as e:
19
+ # print("安装失败!")
20
+ # print("错误:", e.stderr.decode('utf-8'))
21
 
22
+ # install_requirements()
23
+ print("Torch version:", torch.__version__)
24
 
25
  # hf_hub_download(repo_id='wondervictor/ControlAR',
26
  # filename='canny_MR.safetensors',