Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -30,7 +30,9 @@ async def get_prediction(file: UploadFile = File(...)):
|
|
30 |
# Predict with the model
|
31 |
results = model(file_name)
|
32 |
# View results
|
|
|
33 |
for r in results:
|
34 |
print(names[int(r.probs.top1)])
|
|
|
35 |
|
36 |
-
return
|
|
|
30 |
# Predict with the model
|
31 |
results = model(file_name)
|
32 |
# View results
|
33 |
+
class_name = ""
|
34 |
for r in results:
|
35 |
print(names[int(r.probs.top1)])
|
36 |
+
class_name = names[int(r.probs.top1)]
|
37 |
|
38 |
+
return class_name
|