mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 04:23:45 +01:00
fix register not working due to wrong url_for parameter and update README.md for a better solution to easyocr
This commit is contained in:
15
README.md
15
README.md
@@ -2,17 +2,10 @@ A captcha/login page which only allows you to register if you post an image of y
|
|||||||
|
|
||||||
To install, you have to install everything in requirements.txt or do uv sync, but you also have to install easyocr.
|
To install, you have to install everything in requirements.txt or do uv sync, but you also have to install easyocr.
|
||||||
On my machine, i did this because i wanted to install the CPU version of torch or otherwise it would install NVIDIA bloat.
|
On my machine, i did this because i wanted to install the CPU version of torch or otherwise it would install NVIDIA bloat.
|
||||||
If you want to do the same, do:
|
If you want to do the same, add `extra-index-url`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv pip install torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
|
uv pip install easyocr --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
uv pip install easyocr
|
|
||||||
```
|
```
|
||||||
or the same without uv if you use pip.
|
Dont add the flag if you have a dedicated GPU on the computer where you host the project.
|
||||||
|
Run the command without uv if you use pip.
|
||||||
If you want to install it with GPU acceleration for the OCR part, do:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
uv pip install easyocr
|
|
||||||
```
|
|
||||||
or the same without uv if you use pip.
|
|
||||||
@@ -126,7 +126,7 @@ submit_button.addEventListener("click", submit)
|
|||||||
|
|
||||||
function get_challenge() {
|
function get_challenge() {
|
||||||
username_input = document.getElementById("usernameinput")
|
username_input = document.getElementById("usernameinput")
|
||||||
fetch('{{ url_for("generate_challenge") }}', {
|
fetch('{{ url_for("generate_challenge_route") }}', {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({username: username_input.value}),
|
body: JSON.stringify({username: username_input.value}),
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user