Open huzaifansari54 opened 1 month ago
Looks as though Hugging face have changed their parameters as you suggest, this is a bit naughty as it causes breakage for everybody, they should really version their interfaces to stop this. s far as I know this is only solvable by a package update.
can u suggest me how to solve this issue?
Yes, as I've said above it needs a code change in the package to fix this. Feel free to raise a pull request if you wish.
i solve it actually i dont know but we use wrong model thats why we get wrong parameters error use this mode facebook/bart-base i thing we should givepre define list of models so devloper use it like for image to text we give list o working models what you things
Great thanks, I've applied a few very minor edits but otherwise fine. Package re released at version 1.3.0
final input = 'A string of text from which to extract the features.'; final params = ApiQueryNLPFeatureExtraction( inputs: [input], options: InferenceOptions(waitForModel: true)); final result = await apiInstance.queryNLPFeatureExtraction( taskParameters: params, model: 'sentence-transformers/paraphrase-xlm-r-multilingual-v1'); if (result!.isNotEmpty) { for (final row in result) { print(row?.representationFeatures); } } else { print('Inference task API Feature Extraction returned empty result'); }
while runnig this code i get this error ApiException 400: {"error":["Input should be a valid dictionary or instance of SentenceSimilarityInputsCheck: received
['A string of text from which to extract the features.']
inparameters
"]})i think hugging face api changes their parameters I also checked the text generation api it is also not work, could you suggest how to solve this?