Spaces:
Runtime error
Runtime error
Update app.py
Browse files45 unmodified lines46474849505152535455565745 unmodified linesresult_str = "Can't detect this image. Please try another one."return None, None, result_str# best_model = max(all_predictions, key=all_predictions.get)# class_name = class_folders[np.argmax(models[best_model].predict(img)[0])]# probability = max(probability)# result_str = f"{best_model}: {class_name} {probability}%"# result_str.append(result_str)return class_name, probability, None45 unmodified lines46474849505152535455565745 unmodified linesresult_str = "Can't detect this image. Please try another one."return None, None, result_strbest_model = max(all_predictions, key=all_predictions.get)class_name = class_folders[np.argmax(models[best_model].predict(img)[0])]probability = max(probability)result_str = f"{best_model}: {class_name} {probability}%"result_str.append(result_str)return class_name, probability, None
app.py+5-5