Spaces:
Running
Running
no more factories
Browse files- app/utils.py +2 -2
app/utils.py
CHANGED
@@ -7,7 +7,7 @@ import re
|
|
7 |
import subprocess
|
8 |
|
9 |
from demo import constants, state
|
10 |
-
from lczerolens import
|
11 |
from lczerolens.model import lczero as lczero_utils
|
12 |
|
13 |
|
@@ -114,7 +114,7 @@ def get_wrapper_lens_from_state(model_name, lens_type, lens_name="lens", **kwarg
|
|
114 |
if lens_name in state.lenses[lens_type]:
|
115 |
lens = state.lenses[lens_type][lens_name]
|
116 |
else:
|
117 |
-
lens =
|
118 |
if not lens.is_compatible(wrapper):
|
119 |
raise ValueError(f"Lens of type {lens_type} not compatible with model.")
|
120 |
state.lenses[lens_type][lens_name] = lens
|
|
|
7 |
import subprocess
|
8 |
|
9 |
from demo import constants, state
|
10 |
+
from lczerolens import Lens, LczeroModel
|
11 |
from lczerolens.model import lczero as lczero_utils
|
12 |
|
13 |
|
|
|
114 |
if lens_name in state.lenses[lens_type]:
|
115 |
lens = state.lenses[lens_type][lens_name]
|
116 |
else:
|
117 |
+
lens = Lens.from_name(lens_type, **kwargs)
|
118 |
if not lens.is_compatible(wrapper):
|
119 |
raise ValueError(f"Lens of type {lens_type} not compatible with model.")
|
120 |
state.lenses[lens_type][lens_name] = lens
|