jrahn commited on
Commit
7e5f5c2
·
verified ·
1 Parent(s): 2d87915

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -22,10 +22,7 @@ def predict_move(fen, top_k=3):
22
  def btn_load(inp_fen):
23
  print(f'** log - load - ts {datetime.now().isoformat()}, fen: {inp_fen}')
24
  board = chess.Board()
25
-
26
- with open('board.svg', 'w') as f:
27
- f.write(str(chess.svg.board(board)))
28
- return 'board.svg', board.fen(), ''
29
 
30
  def btn_play(inp_fen, inp_move, inp_notation, inp_k):
31
  print(f'** log - play - ts {datetime.now().isoformat()}, fen: {inp_fen}, move: {inp_move}, notation: {inp_notation}, top_k: {inp_k}')
 
22
  def btn_load(inp_fen):
23
  print(f'** log - load - ts {datetime.now().isoformat()}, fen: {inp_fen}')
24
  board = chess.Board()
25
+ return svg_str = chess.svg.board(board), board.fen(), ''
 
 
 
26
 
27
  def btn_play(inp_fen, inp_move, inp_notation, inp_k):
28
  print(f'** log - play - ts {datetime.now().isoformat()}, fen: {inp_fen}, move: {inp_move}, notation: {inp_notation}, top_k: {inp_k}')