From ac84bf774489b3d27264869a58ad3c4884753444 Mon Sep 17 00:00:00 2001 From: Shivam Pandey Date: Wed, 10 Apr 2024 12:59:53 +0530 Subject: [PATCH] models loading was removed unknowingly --- .github/workflows/irctc.yml | 7 ++++++- irctc-captcha-solver/app.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/irctc.yml b/.github/workflows/irctc.yml index b7a90f7..6a723f0 100644 --- a/.github/workflows/irctc.yml +++ b/.github/workflows/irctc.yml @@ -27,6 +27,11 @@ jobs: cache: 'pip' # caching pip dependencies - run: | pip install -r irctc-captcha-solver/requirements.txt + python3 irctc-captcha-solver/app.py "" # python3 irctc-captcha-solver/app.py "" is used for models to load before starting tatkal tickets + echo ::add-mask::$PASSWORD + echo ::add-mask::$USERNAME + echo PASSWORD=$PASSWORD >> $GITHUB_ENV + echo USERNAME=$USERNAME >> $GITHUB_ENV # python3 irctc-captcha-solver/app.py "" is used for models to load before starting tatkal tickets @@ -39,4 +44,4 @@ jobs: uses: cypress-io/github-action@v6 with: browser: chrome - command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{ inputs.USERNAME }},PASSWORD=${{ inputs.PASSWORD }} + command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --browser chrome --env USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }} diff --git a/irctc-captcha-solver/app.py b/irctc-captcha-solver/app.py index 52e8d75..4b323e8 100755 --- a/irctc-captcha-solver/app.py +++ b/irctc-captcha-solver/app.py @@ -6,7 +6,7 @@ import easyocr -reader = easyocr.Reader(["en"], gpu=False) +reader = easyocr.Reader(["en"]) def extract_text_from_image(base64_image):