bstraehle commited on
Commit
ad713d9
·
verified ·
1 Parent(s): 5616689

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,6 +3,7 @@
3
  # https://www.stockfish.online/docs.php (API)
4
  # https://www.stockfish.online/ (FEN to image)
5
 
 
6
  import gradio as gr
7
  import gradio.utils, requests
8
  from typing import Optional, List, Dict, Any
@@ -18,11 +19,11 @@ def position_evaluation(fen):
18
  Returns:
19
  tuple: (result, error) - Best move with continuation in UCI notation
20
  """
21
- is_valid, err_msg = validate_input(fen)
22
 
23
  if not is_valid:
24
- gr.Warning(f"Invalid input: {err_msg}")
25
- return None, err_msg
26
 
27
  print("")
28
 
 
3
  # https://www.stockfish.online/docs.php (API)
4
  # https://www.stockfish.online/ (FEN to image)
5
 
6
+ import re
7
  import gradio as gr
8
  import gradio.utils, requests
9
  from typing import Optional, List, Dict, Any
 
19
  Returns:
20
  tuple: (result, error) - Best move with continuation in UCI notation
21
  """
22
+ is_valid, msg = validate_input(fen)
23
 
24
  if not is_valid:
25
+ gr.Warning(f"Invalid input: {msg}")
26
+ return None, msg
27
 
28
  print("")
29