Spaces:
Runtime error
Runtime error
initial commit
Browse files
app.py
CHANGED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def pre(x_axis ,y_axis ,z_axis):
|
4 |
+
if (knn.predict([[x_axis,y_axis,z_axis]])) == 1:
|
5 |
+
return("Eating");
|
6 |
+
elif(knn.predict([[x_axis,y_axis,z_axis]])) == 2:
|
7 |
+
return("Standing");
|
8 |
+
else:
|
9 |
+
return("Walking")
|
10 |
+
|
11 |
+
demo = gr.Interface(
|
12 |
+
pre,
|
13 |
+
["number","number", "number"],
|
14 |
+
"text",
|
15 |
+
title="Activity classification of your cattle",
|
16 |
+
description="Know what your cattle is doing anytime, anywhere!",
|
17 |
+
)
|
18 |
+
|
19 |
+
demo.launch(share = True)
|