Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,8 @@ action_map = {
|
|
19 |
# Function to process inputs and get a prediction
|
20 |
def action(e1, e2, e3, e4, e5, e6, e7, e8):
|
21 |
# Duplicate each value 3 times to create a 24-length input
|
22 |
-
|
|
|
23 |
predicted_label = model.predict(input_data_reshaped)[0]
|
24 |
return action_map.get(predicted_class[0], "Unknown action")
|
25 |
|
|
|
19 |
# Function to process inputs and get a prediction
|
20 |
def action(e1, e2, e3, e4, e5, e6, e7, e8):
|
21 |
# Duplicate each value 3 times to create a 24-length input
|
22 |
+
input_data = np.array([e1, e2, e3, e4, e5, e6, e7, e8])
|
23 |
+
input_data_reshaped = input_data.reshape(1, -1)
|
24 |
predicted_label = model.predict(input_data_reshaped)[0]
|
25 |
return action_map.get(predicted_class[0], "Unknown action")
|
26 |
|