Update app.py
Browse files
app.py
CHANGED
@@ -82,12 +82,15 @@ def search_face(file, token_txt, request: gr.Request):
|
|
82 |
api_name="/search_face"
|
83 |
)
|
84 |
except:
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
|
|
91 |
|
92 |
result = json.loads(result_text)
|
93 |
outarray = []
|
|
|
82 |
api_name="/search_face"
|
83 |
)
|
84 |
except:
|
85 |
+
try:
|
86 |
+
backend = Client(BACKEND, auth=[USER, PASS])
|
87 |
+
result_text = backend.predict(
|
88 |
+
file=file1,
|
89 |
+
token=token_txt,
|
90 |
+
api_name="/search_face"
|
91 |
+
)
|
92 |
+
except:
|
93 |
+
return []
|
94 |
|
95 |
result = json.loads(result_text)
|
96 |
outarray = []
|