nico9ga's picture
Create main.py
16eceb4 verified
raw
history blame contribute delete
336 Bytes
from prediction import predict_class
import tensorflow as tf
# Cargar el modelo
new_model = tf.keras.models.load_model('fruits_detection.keras')
# Funci贸n para manejar la solicitud de predicci贸n
def predict_image(image_path):
predicted_class = predict_class(new_model, image_path)
return {"predicted_class": predicted_class}