Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def predict(text):
|
|
21 |
#return 'machine', 1.0
|
22 |
res = get_api_response(text)
|
23 |
if 'pred' not in res.keys():
|
24 |
-
return "Waiting for the server startup, try again!", "Waiting for the server startup, try again!"
|
25 |
pred = "Very likely human-written"
|
26 |
if res['score'] > 0.05: pred = "Likely human-written"
|
27 |
if res['score'] > 0.5: pred = "Likely machine-generated"
|
|
|
21 |
#return 'machine', 1.0
|
22 |
res = get_api_response(text)
|
23 |
if 'pred' not in res.keys():
|
24 |
+
return "Waiting for the server startup (up to 1 min for the first request), try again!", "Waiting for the server startup (up to 1 min for the first request), try again!"
|
25 |
pred = "Very likely human-written"
|
26 |
if res['score'] > 0.05: pred = "Likely human-written"
|
27 |
if res['score'] > 0.5: pred = "Likely machine-generated"
|