Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,7 @@ import numpy as np
|
|
12 |
import os
|
13 |
from datetime import datetime
|
14 |
from huggingface_hub import hf_hub_download
|
|
|
15 |
def creatMask(Image, threshold=5):
|
16 |
##This program try to creat the mask for the filed-of-view
|
17 |
##Input original image (RGB or green channel), threshold (user set parameter, default 10)
|
@@ -301,7 +302,7 @@ def segment_by_out_test(image,model_name):
|
|
301 |
repo_id="weidai00/RIP-AV-sulab", # 模型库的名字
|
302 |
filename=f"G_{model_name}.pkl", # 文件名
|
303 |
repo_type="model", # 模型库必须写 repo_type
|
304 |
-
|
305 |
)
|
306 |
cfg.set_dataset(model_name)
|
307 |
if image is None:
|
|
|
12 |
import os
|
13 |
from datetime import datetime
|
14 |
from huggingface_hub import hf_hub_download
|
15 |
+
hf_token = os.environ.get("hf_token")
|
16 |
def creatMask(Image, threshold=5):
|
17 |
##This program try to creat the mask for the filed-of-view
|
18 |
##Input original image (RGB or green channel), threshold (user set parameter, default 10)
|
|
|
302 |
repo_id="weidai00/RIP-AV-sulab", # 模型库的名字
|
303 |
filename=f"G_{model_name}.pkl", # 文件名
|
304 |
repo_type="model", # 模型库必须写 repo_type
|
305 |
+
token=hf_token
|
306 |
)
|
307 |
cfg.set_dataset(model_name)
|
308 |
if image is None:
|