Spaces:
Runtime error
Runtime error
Labelled fillable grids as A and added parsedFromImage field
Browse files- extractpuzzle.py +1 -1
- main.py +2 -0
- requirements.txt +0 -1
extractpuzzle.py
CHANGED
|
@@ -385,7 +385,7 @@ def get_square_color(image, box):
|
|
| 385 |
if mean_value < 128:
|
| 386 |
square_color = "."
|
| 387 |
else:
|
| 388 |
-
square_color = "
|
| 389 |
|
| 390 |
return square_color
|
| 391 |
|
|
|
|
| 385 |
if mean_value < 128:
|
| 386 |
square_color = "."
|
| 387 |
else:
|
| 388 |
+
square_color = "A"
|
| 389 |
|
| 390 |
return square_color
|
| 391 |
|
main.py
CHANGED
|
@@ -71,7 +71,9 @@ async def upload(file: UploadFile = File(...)):
|
|
| 71 |
except Exception as e:
|
| 72 |
grid_data['ClueExtractionStatus'] = "Failed"
|
| 73 |
|
|
|
|
| 74 |
grid_data.update(clue_data)
|
|
|
|
| 75 |
print(grid_data)
|
| 76 |
|
| 77 |
return grid_data
|
|
|
|
| 71 |
except Exception as e:
|
| 72 |
grid_data['ClueExtractionStatus'] = "Failed"
|
| 73 |
|
| 74 |
+
grid_data['parsedFromImage'] = "True"
|
| 75 |
grid_data.update(clue_data)
|
| 76 |
+
|
| 77 |
print(grid_data)
|
| 78 |
|
| 79 |
return grid_data
|
requirements.txt
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
fastapi== 0.104.1
|
| 2 |
uvicorn[standard]
|
| 3 |
numpy==1.26.2
|
| 4 |
-
scipy==1.11.4
|
| 5 |
aiofiles==23.2.1
|
| 6 |
python-multipart
|
| 7 |
opencv-python-headless==4.6.0.66
|
|
|
|
| 1 |
fastapi== 0.104.1
|
| 2 |
uvicorn[standard]
|
| 3 |
numpy==1.26.2
|
|
|
|
| 4 |
aiofiles==23.2.1
|
| 5 |
python-multipart
|
| 6 |
opencv-python-headless==4.6.0.66
|