Spaces:
Runtime error
Runtime error
Update app.py
Browse files42 unmodified lines434445464748495010 unmodified lines6162636465666742 unmodified linesif min_probability < 70: # Adjust the threshold as neededresult_str = "Can't detect this image. Please try another one."history.append(result_str)return None, None, historybest_model = max(all_predictions, key=all_predictions.get)class_name = class_folders[np.argmax(models[best_model].predict(img)[0])]10 unmodified linesimage_input = gr.Image(type='filepath', label="Input Image")model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_textbox = gr.Label("Results", label="Results")iface = gr.Interface(fn=classify_selected_model,42 unmodified lines434445464748495010 unmodified lines6162636465666742 unmodified linesif min_probability < 70: # Adjust the threshold as neededresult_str = "Can't detect this image. Please try another one."class_name.append(result_str)return class_name, None, Nonebest_model = max(all_predictions, key=all_predictions.get)class_name = class_folders[np.argmax(models[best_model].predict(img)[0])]10 unmodified linesimage_input = gr.Image(type='filepath', label="Input Image")model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_textbox = gr.Textbox("Results", label="Results")iface = gr.Interface(fn=classify_selected_model,
app.py+3-3