Spaces:
Runtime error
Runtime error
liuyizhang
commited on
Commit
•
fd01170
1
Parent(s):
479e57d
update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
|
2 |
-
import subprocess
|
3 |
|
4 |
if 0==1:
|
5 |
result = subprocess.run(['pip', 'install', '-e', 'segment_anything'], check=True)
|
@@ -10,14 +10,15 @@ if 0==1:
|
|
10 |
result = subprocess.run(['pip', 'list'], check=True)
|
11 |
print(f'liuyz_pip list result = {result}')
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
15 |
|
16 |
import gradio as gr
|
17 |
|
18 |
import argparse
|
19 |
import copy
|
20 |
-
import os
|
21 |
|
22 |
import numpy as np
|
23 |
import torch
|
|
|
1 |
|
2 |
+
import subprocess, os, sys
|
3 |
|
4 |
if 0==1:
|
5 |
result = subprocess.run(['pip', 'install', '-e', 'segment_anything'], check=True)
|
|
|
10 |
result = subprocess.run(['pip', 'list'], check=True)
|
11 |
print(f'liuyz_pip list result = {result}')
|
12 |
|
13 |
+
if not os.path.exists('/sam_vit_h_4b8939.pth'):
|
14 |
+
result = subprocess.run(['wget', 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth'], check=True)
|
15 |
+
print(f'liuyz_wget sam_vit_h_4b8939.pth result = {result}')
|
16 |
+
|
17 |
|
18 |
import gradio as gr
|
19 |
|
20 |
import argparse
|
21 |
import copy
|
|
|
22 |
|
23 |
import numpy as np
|
24 |
import torch
|