Spaces:
Sleeping
Sleeping
Cache bots instead of game
Browse files- app.py +0 -16
- requirements.txt +0 -12
app.py
CHANGED
@@ -5,27 +5,11 @@ from chessmodels import DCMinMax
|
|
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():
|
|
|
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():
|
requirements.txt
CHANGED
@@ -1,16 +1,4 @@
|
|
1 |
-
uvicorn
|
2 |
-
ray==2.9.3
|
3 |
-
ray[tune]==2.9.3
|
4 |
-
torch==1.13.1
|
5 |
-
pygame==2.1.3.dev8
|
6 |
-
pettingzoo==1.24.3
|
7 |
-
chess==1.10.0
|
8 |
-
dm_tree==0.1.8
|
9 |
-
scikit-image
|
10 |
-
posix_ipc==1.1.1
|
11 |
-
torchvision==0.14.1
|
12 |
huggingface_hub==0.24.0
|
13 |
-
lz4==4.3.3
|
14 |
safetensors==0.4.3
|
15 |
streamlit==1.36.0
|
16 |
streamlit-image-coordinates==0.1.9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
huggingface_hub==0.24.0
|
|
|
2 |
safetensors==0.4.3
|
3 |
streamlit==1.36.0
|
4 |
streamlit-image-coordinates==0.1.9
|