Spaces:
Running
Running
Commit
·
35561db
1
Parent(s):
c007670
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,7 +99,15 @@ async def search(data: dict):
|
|
| 99 |
positions = get_puzzle_positions(row['FEN'], row['Moves'])
|
| 100 |
matched_board = positions[move_idx]
|
| 101 |
|
| 102 |
-
result = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
yield json.dumps(result) + "\n"
|
| 104 |
|
| 105 |
return StreamingResponse(generate(), media_type="application/x-ndjson")
|
|
|
|
| 99 |
positions = get_puzzle_positions(row['FEN'], row['Moves'])
|
| 100 |
matched_board = positions[move_idx]
|
| 101 |
|
| 102 |
+
result = {
|
| 103 |
+
"PuzzleId": row['PuzzleId'],
|
| 104 |
+
"FEN": matched_board.fen(),
|
| 105 |
+
"Moves": row['Moves'],
|
| 106 |
+
"Rating": row['Rating'],
|
| 107 |
+
"Popularity": row['Popularity'],
|
| 108 |
+
"Themes": row['Themes'],
|
| 109 |
+
"MatchedMove": move_idx
|
| 110 |
+
}
|
| 111 |
yield json.dumps(result) + "\n"
|
| 112 |
|
| 113 |
return StreamingResponse(generate(), media_type="application/x-ndjson")
|