Refactor prediction function: update input key from 'image' to 'composite'
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def predict(data):
|
|
42 |
return {class_names[i]: top_3_probs[i] for i in range(3)} """
|
43 |
|
44 |
def predict(data):
|
45 |
-
# Extract the '
|
46 |
-
img = data['
|
47 |
# Convert to NumPy array
|
48 |
img = np.array(img)
|
49 |
|
|
|
42 |
return {class_names[i]: top_3_probs[i] for i in range(3)} """
|
43 |
|
44 |
def predict(data):
|
45 |
+
# Extract the 'composite' key from the input dictionary
|
46 |
+
img = data['composite']
|
47 |
# Convert to NumPy array
|
48 |
img = np.array(img)
|
49 |
|