Spaces:
Sleeping
Sleeping
Update other_function.py
Browse files- other_function.py +4 -1
other_function.py
CHANGED
@@ -67,7 +67,10 @@ def predict_pest(filepath):
|
|
67 |
api_key="oF1aC4b1FBCDtK8CoKx7"
|
68 |
)
|
69 |
result = CLIENT.infer(filepath, model_id="pest-detection-ueoco/1")
|
70 |
-
|
|
|
|
|
|
|
71 |
except:
|
72 |
return None
|
73 |
|
|
|
67 |
api_key="oF1aC4b1FBCDtK8CoKx7"
|
68 |
)
|
69 |
result = CLIENT.infer(filepath, model_id="pest-detection-ueoco/1")
|
70 |
+
a= result['predictions'][0]
|
71 |
+
if a=='x':
|
72 |
+
return 'APHIDS'
|
73 |
+
return a
|
74 |
except:
|
75 |
return None
|
76 |
|