Spaces:
Sleeping
Sleeping
Cache bots instead of game
Browse files
app.py
CHANGED
@@ -5,11 +5,27 @@ from chessmodels import DCMinMax
|
|
5 |
import streamlit as st
|
6 |
from streamlit_image_coordinates import streamlit_image_coordinates
|
7 |
|
|
|
8 |
BOT_SELECITONS = ["DeepChessReplicationMinMax"]
|
9 |
|
10 |
@st.cache_resource
|
11 |
def load_model(bot_select):
|
12 |
return DCMinMax.from_pretrained("mzimm003/{}".format(bot_select))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
@st.cache_resource
|
15 |
def track_play():
|
|
|
5 |
import streamlit as st
|
6 |
from streamlit_image_coordinates import streamlit_image_coordinates
|
7 |
|
8 |
+
<<<<<<< HEAD
|
9 |
BOT_SELECITONS = ["DeepChessReplicationMinMax"]
|
10 |
|
11 |
@st.cache_resource
|
12 |
def load_model(bot_select):
|
13 |
return DCMinMax.from_pretrained("mzimm003/{}".format(bot_select))
|
14 |
+
=======
|
15 |
+
class HvB(HumanVsBot):
|
16 |
+
@staticmethod
|
17 |
+
# @st.cache_resource()
|
18 |
+
def get_hvb_manager(
|
19 |
+
_model,
|
20 |
+
_environment,
|
21 |
+
_extra_model_environment_context,
|
22 |
+
**kwargs):
|
23 |
+
return HvB(
|
24 |
+
model = _model,
|
25 |
+
environment = _environment,
|
26 |
+
extra_model_environment_context = _extra_model_environment_context,
|
27 |
+
**kwargs)
|
28 |
+
>>>>>>> 2f7ab9673788b61782f34e45504883f2f5f211fc
|
29 |
|
30 |
@st.cache_resource
|
31 |
def track_play():
|