Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 8, 2024
1 parent 9ac8766 commit bb689bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
continue-on-error: true
with:
python-version: '3.11'
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 ""
- name: Install Node.js and npm
Expand Down
11 changes: 8 additions & 3 deletions irctc-captcha-solver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ def extract_text_from_image(base64_image):
parser = argparse.ArgumentParser(
description="Extract text from a base64 encoded image."
)
parser.add_argument("image", type=str, help="Base64 encoded image")
parser.add_argument(
"image", type=str, nargs="?", default="", help="Base64 encoded image"
)
args = parser.parse_args()

extracted_text = extract_text_from_image(args.image)
print(extracted_text)
if args.image == "":
print("No image provided")
else:
extracted_text = extract_text_from_image(args.image)
print(extracted_text)

0 comments on commit bb689bf

Please sign in to comment.