scikit-llm icon indicating copy to clipboard operation
scikit-llm copied to clipboard

Update gpt_zero_shot_clf.py

Open mzamini92 opened this issue 1 year ago • 0 comments

You can remove the fit method from MultiLabelZeroShotGPTClassifier since it is already inherited from the base class. In the _predict_single method of ZeroShotGPTClassifier, you can directly return the random label instead of assigning it to the label variable and then returning it. use super() instead of explicitly mentioning the parent class name. This ensures that the code remains consistent and avoids potential issues when inheriting from multiple classes.

mzamini92 avatar May 23 '23 02:05 mzamini92