Spaces:
Runtime error
Runtime error
Update app .py
Browse files31 unmodified lines3233343535363738394041424243444531 unmodified lines elif model_name == "InceptionV3": predictions = Inception_model.predict(img)
class_indices = np.argsort(predictions[0])[::-1] # Sort indices in descending order of probability 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] # Return an error message and None for probability return [str(e)], [None]
# Create Gradio interfaceimage_input = gr.Image(type='filepath', label="Input Image")app .py+2-2