Spaces:
Runtime error
Runtime error
Update app .py
Browse files31 unmodified lines323334353637383940414243444531 unmodified lineselif model_name == "InceptionV3":predictions = Inception_model.predict(img)class_indices = np.argsort(predictions[0])[::-1] # Sort indices in descending order of probabilityclass_probabilities = predictions[0][class_indices]class_names = [class_folders[idx] for idx in class_indices]return class_names, class_probabilities.tolist()except Exception as e:return [str(e)], [None] # Return an error message and None for probability# Create Gradio interfaceimage_input = gr.Image(type='filepath', label="Input Image")31 unmodified lines323334353637383940414243444531 unmodified lineselif model_name == "InceptionV3":predictions = Inception_model.predict(img)class_indices = np.argsort(predictions[0])[::-1]class_probabilities = predictions[0][class_indices]class_names = [class_folders[idx] for idx in class_indices]return class_names, class_probabilities.tolist()except Exception as e:return [str(e)], [None]# Create Gradio interfaceimage_input = gr.Image(type='filepath', label="Input Image")
app .py+2-2