from transformers import pipeline # Load the Hugging Face model pipeline (example: text classification) def load_model(): model = pipeline("text-classification") return model def predict(model, text): # Get the prediction for the input text prediction = model(text) return prediction