Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yashindane/web-sudoku
:white_square_button: A flask webapp to solve sudoku from image input
https://github.com/yashindane/web-sudoku
aws-textract flask
Last synced: 1 day ago
JSON representation
:white_square_button: A flask webapp to solve sudoku from image input
- Host: GitHub
- URL: https://github.com/yashindane/web-sudoku
- Owner: YashIndane
- License: mit
- Created: 2021-05-24T10:42:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-12T09:46:05.000Z (almost 2 years ago)
- Last Synced: 2023-03-05T07:43:14.717Z (over 1 year ago)
- Topics: aws-textract, flask
- Language: CSS
- Homepage:
- Size: 816 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](https://img.shields.io/badge/python-3-orange?style=flat-square)
# web-sudoku
A flask webapp to solve sudoku from image input![solved1](https://user-images.githubusercontent.com/53041219/207013634-3a80d9ab-0e3d-43d5-a4da-628be5626c9a.png)
[Demo link](https://www.linkedin.com/posts/yash-indane-aa6534179_aws-flask-python-activity-6803238011279548416-jjeQ)
## AWS CLI configuration
Have user ready in AWS with admin and power user access. This user will be used to call the AWS Textract service.
Create a S3 bucket in this users account.# Usage
```
$ sudo docker run -dit -p :1453 --name yashindane/websudoku:v1 --aak="" --ask="" --region="" --bucketname=""
```# On arm64 v8 machines
```
$ sudo docker run --platform linux/arm64/v8 -dit -p :1453 --name yashindane/websudoku:arm64v8 --aak="" --ask="" --region="" --bucketname=""
```# On arm64 v8 machines using podman
```
$ sudo podman run --platform linux/arm64/v8 -dit -p :1453 --name docker.io/yashindane/websudoku:arm64v8 --aak="" --ask="" --region="" --bucketname=""
```## How it works
The user first clicks a pic of there sudoku board and submits it. The `data_uri` of the image goes to backend `app2.py` script through the form on user click.
Using `base64`, `ìo` and `PIL` libraries, the image is saved in the server and then uploaded to `S3` bucket. Now using `AWS Textract`, the digits from the image in bucket are extracted and send back to the `app2.py`. This digits in a double array are fed to the function `sudoku3.solve()`, which returns the solution to the problem. This diits are then rendered on the `output.html` page.Pull requests and new Ideas are welcome!