app.py
CHANGED
@@ -47,6 +47,13 @@ silent = False
|
|
47 |
gradio_delete_cache = 7200
|
48 |
print(f'{HERE_PATH}/third_party/ml-depth-pro/checkpoints/')
|
49 |
hf_hub_download(repo_id="apple/DepthPro", filename='depth_pro.pt', local_dir=f'{HERE_PATH}/third_party/ml-depth-pro/checkpoints/')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
class FileState:
|
52 |
def __init__(self, outfile_name=None):
|
@@ -198,7 +205,7 @@ with gradio.Blocks(css=css, title=title, delete_cache=(gradio_delete_cache, grad
|
|
198 |
examples=[
|
199 |
[
|
200 |
os.path.join(HERE_PATH, 'example/bear/00000.jpg'),
|
201 |
-
2, True, True, True, False, 0.02, "Depth
|
202 |
[os.path.join(HERE_PATH, 'example/bear/00000.jpg'),
|
203 |
os.path.join(HERE_PATH, 'example/bear/00001.jpg'),
|
204 |
os.path.join(HERE_PATH, 'example/bear/00002.jpg'),
|
|
|
47 |
gradio_delete_cache = 7200
|
48 |
print(f'{HERE_PATH}/third_party/ml-depth-pro/checkpoints/')
|
49 |
hf_hub_download(repo_id="apple/DepthPro", filename='depth_pro.pt', local_dir=f'{HERE_PATH}/third_party/ml-depth-pro/checkpoints/')
|
50 |
+
items = os.listdir(f'{HERE_PATH}/third_party/ml-depth-pro/checkpoints/')
|
51 |
+
|
52 |
+
# 过滤出文件
|
53 |
+
files = [item for item in items if os.path.isfile(os.path.join(directory, item))]
|
54 |
+
|
55 |
+
# 打印文件列表
|
56 |
+
print(files)
|
57 |
|
58 |
class FileState:
|
59 |
def __init__(self, outfile_name=None):
|
|
|
205 |
examples=[
|
206 |
[
|
207 |
os.path.join(HERE_PATH, 'example/bear/00000.jpg'),
|
208 |
+
2, True, True, True, False, 0.02, "Depth Pro",
|
209 |
[os.path.join(HERE_PATH, 'example/bear/00000.jpg'),
|
210 |
os.path.join(HERE_PATH, 'example/bear/00001.jpg'),
|
211 |
os.path.join(HERE_PATH, 'example/bear/00002.jpg'),
|