mzimm003 commited on
Commit
770f950
·
1 Parent(s): cf5610d

Add application file

Browse files
Files changed (2) hide show
  1. app.py +18 -0
  2. requirements.txt +0 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from my_chess.scripts import HumanVsBot
2
+ from my_chess.learner.environments import Chess
3
+
4
+ from huggingface.pushmodels import DCMinMax
5
+
6
+
7
+ def main(kwargs=None):
8
+ modelminmax = DCMinMax.from_pretrained("mzimm003/DeepChessReplicationMinMax")
9
+ play = HumanVsBot(
10
+ model=modelminmax,
11
+ environment=Chess(render_mode="human"),
12
+ extra_model_environment_context=lambda env: {"board":env.board}
13
+ )
14
+ play.run()
15
+
16
+ if __name__ == "__main__":
17
+ main()
18
+
requirements.txt ADDED
File without changes