Spaces:
Runtime error
Runtime error
vincentlui
commited on
Commit
•
6bf3506
1
Parent(s):
aedbeed
update
Browse files
app.py
CHANGED
@@ -13,13 +13,11 @@ except:
|
|
13 |
print('Fail to download code')
|
14 |
|
15 |
try:
|
16 |
-
from bridge_hand_detect2.predict import CardDetectionModel
|
17 |
from bridge_hand_detect2.pbn import create_pbn_file
|
18 |
-
model_dir = 'bridge_hand_detect2/model.onnx'
|
19 |
except:
|
20 |
-
from bridge_hand_detect.predict import CardDetectionModel
|
21 |
from bridge_hand_detect.pbn import create_pbn_file
|
22 |
-
model_dir = 'bridge_hand_detect/model.onnx'
|
23 |
|
24 |
custom_css = \
|
25 |
"""
|
@@ -32,7 +30,7 @@ custom_css = \
|
|
32 |
INPUT_IMG_HEIGHT = 480
|
33 |
OUTPUT_IMG_HEIGHT = 320
|
34 |
css = ".output_img {display:block; margin-left: auto; margin-right: auto}"
|
35 |
-
model = CardDetectionModel(
|
36 |
|
37 |
def predict(image_path):
|
38 |
start = timer()
|
|
|
13 |
print('Fail to download code')
|
14 |
|
15 |
try:
|
16 |
+
from bridge_hand_detect2.predict import CardDetectionModel
|
17 |
from bridge_hand_detect2.pbn import create_pbn_file
|
|
|
18 |
except:
|
19 |
+
from bridge_hand_detect.predict import CardDetectionModel
|
20 |
from bridge_hand_detect.pbn import create_pbn_file
|
|
|
21 |
|
22 |
custom_css = \
|
23 |
"""
|
|
|
30 |
INPUT_IMG_HEIGHT = 480
|
31 |
OUTPUT_IMG_HEIGHT = 320
|
32 |
css = ".output_img {display:block; margin-left: auto; margin-right: auto}"
|
33 |
+
model = CardDetectionModel()
|
34 |
|
35 |
def predict(image_path):
|
36 |
start = timer()
|