Spaces:
Runtime error
Runtime error
def predict(): | |
request_obj = g.data | |
text = request_obj["text"] | |
candidate_labels = request_obj["candidate_labels"] | |
# predict | |
prediction = ZeroShotTextClassifier.predict( | |
text=text, | |
candidate_labels=candidate_labels) | |
return jsonify(prediction) |