Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ with open("labels.txt", "r") as file:
|
|
26 |
|
27 |
def classify(image_path):
|
28 |
try:
|
29 |
-
output =
|
30 |
for i in output:
|
31 |
image_data = np.array(image_path)
|
32 |
image_data = cv.resize(image_data, (224, 224))
|
@@ -76,7 +76,7 @@ def classify(image_path):
|
|
76 |
|
77 |
reply = response["choices"][0]["message"]["content"]
|
78 |
|
79 |
-
output.append("type": max_label, "prediction_value":
|
80 |
|
81 |
return output
|
82 |
|
|
|
26 |
|
27 |
def classify(image_path):
|
28 |
try:
|
29 |
+
output = []
|
30 |
for i in output:
|
31 |
image_data = np.array(image_path)
|
32 |
image_data = cv.resize(image_data, (224, 224))
|
|
|
76 |
|
77 |
reply = response["choices"][0]["message"]["content"]
|
78 |
|
79 |
+
output.append({"type": max_label, "prediction_value": round(max_prediction_value, 2), "content": reply})
|
80 |
|
81 |
return output
|
82 |
|