Update app.py
Browse files
app.py
CHANGED
@@ -75,10 +75,15 @@ def search_face(file, token_txt, request: gr.Request):
|
|
75 |
gr.Info("β³ Wait for your next free search, or π Go Premium for deep search!", duration=12)
|
76 |
return []
|
77 |
|
|
|
|
|
|
|
|
|
78 |
try:
|
79 |
result_text = backend.predict(
|
80 |
file=file1,
|
81 |
token=token_txt,
|
|
|
82 |
api_name="/search_face"
|
83 |
)
|
84 |
except:
|
@@ -87,6 +92,7 @@ def search_face(file, token_txt, request: gr.Request):
|
|
87 |
result_text = backend.predict(
|
88 |
file=file1,
|
89 |
token=token_txt,
|
|
|
90 |
api_name="/search_face"
|
91 |
)
|
92 |
except:
|
|
|
75 |
gr.Info("β³ Wait for your next free search, or π Go Premium for deep search!", duration=12)
|
76 |
return []
|
77 |
|
78 |
+
country_code = ""
|
79 |
+
if token_txt != "":
|
80 |
+
country_code = "LLPP"
|
81 |
+
|
82 |
try:
|
83 |
result_text = backend.predict(
|
84 |
file=file1,
|
85 |
token=token_txt,
|
86 |
+
country_code=country_code,
|
87 |
api_name="/search_face"
|
88 |
)
|
89 |
except:
|
|
|
92 |
result_text = backend.predict(
|
93 |
file=file1,
|
94 |
token=token_txt,
|
95 |
+
country_code=country_code,
|
96 |
api_name="/search_face"
|
97 |
)
|
98 |
except:
|