Spaces:
Runtime error
Runtime error
Update app.py
Browse files42 unmodified lines4344454647464748495010 unmodified lines616263646465666742 unmodified lines
if min_probability < 70: # Adjust the threshold as needed result_str = "Can't detect this image. Please try another one." history.append(result_str) return None, None, history class_name.append(result_str) return class_name, None, None
best_model = max(all_predictions, key=all_predictions.get) class_name = class_folders[np.argmax(models[best_model].predict(img)[0])]10 unmodified lines
image_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")result_textbox = gr.Textbox("Results", label="Results")
iface = gr.Interface( fn=classify_selected_model,app.py+3-3