Spaces:
Runtime error
Runtime error
def transcribe(audio): | |
text = trans(audio)["text"] | |
return text | |
def clasificacion(text): | |
return clasificador(text)[0]["label"] | |
def clasifica_imagen(inp): | |
inp = inp.reshape((-1224,224,3)) | |
inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp) | |
prediction = inception_net.predict(inp).flatten() | |
confidences = {etiquetas[i]:float(prediction[i]) for i in range(1000)} | |
return confidences |