Spaces:
Sleeping
Sleeping
Pavan+2-at-244075126032
commited on
Commit
·
cd06523
1
Parent(s):
7d200f3
print log added and removed yolo
Browse files- app/__init__.py +1 -1
- app/routes/uidaiServices.py +3 -1
- requirements.txt +8 -8
app/__init__.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from flask import Flask
|
| 2 |
-
from ultralytics import YOLO
|
| 3 |
|
| 4 |
def create_app():
|
| 5 |
app = Flask(__name__)
|
|
|
|
| 1 |
from flask import Flask
|
| 2 |
+
# from ultralytics import YOLO
|
| 3 |
|
| 4 |
def create_app():
|
| 5 |
app = Flask(__name__)
|
app/routes/uidaiServices.py
CHANGED
|
@@ -25,10 +25,12 @@ def generate_captcha(transaction_id):
|
|
| 25 |
"captchaType": "1",
|
| 26 |
"audioCaptchaRequired": False
|
| 27 |
}
|
| 28 |
-
|
| 29 |
try:
|
|
|
|
| 30 |
response = requests.post(url, headers=headers, json=data)
|
|
|
|
| 31 |
response.raise_for_status() # Raise HTTPError for bad responses
|
|
|
|
| 32 |
return response.json()
|
| 33 |
except requests.RequestException as e:
|
| 34 |
print(f"Error in Captcha Generation from UIDAI: {e}")
|
|
|
|
| 25 |
"captchaType": "1",
|
| 26 |
"audioCaptchaRequired": False
|
| 27 |
}
|
|
|
|
| 28 |
try:
|
| 29 |
+
print("Generating Captcha from UIDAI")
|
| 30 |
response = requests.post(url, headers=headers, json=data)
|
| 31 |
+
print(response)
|
| 32 |
response.raise_for_status() # Raise HTTPError for bad responses
|
| 33 |
+
print(response.json())
|
| 34 |
return response.json()
|
| 35 |
except requests.RequestException as e:
|
| 36 |
print(f"Error in Captcha Generation from UIDAI: {e}")
|
requirements.txt
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
Flask==2.0.2
|
| 2 |
Werkzeug==2.0.2
|
| 3 |
-
|
| 4 |
-
ultralytics
|
| 5 |
-
opencv-python-headless
|
| 6 |
-
Pillow
|
| 7 |
-
requests
|
| 8 |
-
pytesseract
|
| 9 |
gunicorn
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
Flask==2.0.2
|
| 2 |
Werkzeug==2.0.2
|
| 3 |
+
python-dotenv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
gunicorn
|
| 5 |
+
requests
|
| 6 |
+
# torch
|
| 7 |
+
# ultralytics
|
| 8 |
+
# opencv-python-headless
|
| 9 |
+
# Pillow
|
| 10 |
+
# pytesseract
|
| 11 |
+
# openpyxl
|