detection: Make model dir before downloading
This commit is contained in:
parent
cc33eebbe5
commit
45432648c2
@ -2,6 +2,7 @@ import os
|
|||||||
import oss2
|
import oss2
|
||||||
|
|
||||||
def get_model(name):
|
def get_model(name):
|
||||||
|
os.makedirs(os.path.join(os.path.dirname(__file__), "model"), exist_ok=True)
|
||||||
fn = os.path.join(os.path.dirname(__file__), "model", name)
|
fn = os.path.join(os.path.dirname(__file__), "model", name)
|
||||||
if os.path.exists(fn):
|
if os.path.exists(fn):
|
||||||
return fn
|
return fn
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user