Spaces:
Sleeping
Sleeping
Commit
·
2968926
1
Parent(s):
d4b066d
changes made in fen correction
Browse files
__pycache__/main.cpython-311.pyc
CHANGED
Binary files a/__pycache__/main.cpython-311.pyc and b/__pycache__/main.cpython-311.pyc differ
|
|
main.py
CHANGED
@@ -117,7 +117,7 @@ async def get_fen(file : UploadFile = File(), perspective : str = Form("w"), nex
|
|
117 |
if "error" in detection_results:
|
118 |
return JSONResponse(content=detection_results, status_code=400)
|
119 |
|
120 |
-
fen = gen_fen(detection_results, perspective)
|
121 |
if not fen:
|
122 |
return JSONResponse(content={"error": "FEN generation failed", "details": "Invalid input data"}, status_code=500)
|
123 |
|
|
|
117 |
if "error" in detection_results:
|
118 |
return JSONResponse(content=detection_results, status_code=400)
|
119 |
|
120 |
+
fen = gen_fen(detection_results, perspective, next_to_move)
|
121 |
if not fen:
|
122 |
return JSONResponse(content={"error": "FEN generation failed", "details": "Invalid input data"}, status_code=500)
|
123 |
|
routes/__pycache__/fen_generator.cpython-311.pyc
CHANGED
Binary files a/routes/__pycache__/fen_generator.cpython-311.pyc and b/routes/__pycache__/fen_generator.cpython-311.pyc differ
|
|
routes/fen_generator.py
CHANGED
@@ -108,7 +108,7 @@ def gen_fen(result: dict, p: str, next_to_move : str):
|
|
108 |
fen_rows.append(fen_row) # FIXED: Ensured last row is added
|
109 |
|
110 |
position_fen = "/".join(fen_rows)
|
111 |
-
fen_notation = f"{position_fen}{next_to_move} - - 0 0"
|
112 |
|
113 |
return fen_notation
|
114 |
|
|
|
108 |
fen_rows.append(fen_row) # FIXED: Ensured last row is added
|
109 |
|
110 |
position_fen = "/".join(fen_rows)
|
111 |
+
fen_notation = f"{position_fen} {next_to_move} - - 0 0"
|
112 |
|
113 |
return fen_notation
|
114 |
|