Update app.py
Browse files
app.py
CHANGED
|
@@ -4,14 +4,14 @@ import requests
|
|
| 4 |
import json
|
| 5 |
|
| 6 |
def check_id_liveness(frame):
|
| 7 |
-
url = "http://191.96.31.183:8093/api/check_id_liveness"
|
| 8 |
-
files = {'image': open(frame, 'rb')}
|
| 9 |
-
try:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
except requests.exceptions.RequestException as e:
|
| 14 |
-
|
| 15 |
|
| 16 |
# APP Interface
|
| 17 |
with gr.Blocks() as MiniAIdemo:
|
|
|
|
| 4 |
import json
|
| 5 |
|
| 6 |
def check_id_liveness(frame):
|
| 7 |
+
# url = "http://191.96.31.183:8093/api/check_id_liveness"
|
| 8 |
+
# files = {'image': open(frame, 'rb')}
|
| 9 |
+
# try:
|
| 10 |
+
# r = requests.post(url=url, files=files)
|
| 11 |
+
# r.raise_for_status()
|
| 12 |
+
# return json.dumps(r.json(), indent=2)
|
| 13 |
+
# except requests.exceptions.RequestException as e:
|
| 14 |
+
# return str(e)
|
| 15 |
|
| 16 |
# APP Interface
|
| 17 |
with gr.Blocks() as MiniAIdemo:
|