Util
This is a class for handling process of making predictions in DS2.ai's application according to the file format, such as csv, jpg, png, mov, and etc.
Calls self._predict() with different parameters according to the format of the file.
predict(request_data, predict_url, data, info=False)
- request_data (dict) : Stores all the information for making requests for the current prediction.
- predict_url (str) : A specific url as a string as a parameter for calling self._predict().
- data (dict, string, file) : Target for prediction, can take multiple formats.
- requests
Returns information on req.post depending on file_content.
_predict(target_url, request_data, file_content=None)
- target_url (str) : Name of the label class.
- request_data (str): Stores all the information for making requests for the current prediction and is the same content as request_data in self.predict().
- file_content (str): Gets file content from self.predict() for prediction.
- None
Last modified 1yr ago