Util
class Util(object)
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.
predict()
Calls self._predict() with different parameters according to the format of the file.
Parmeters
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.
Return type
requests
_predict()
Returns information on req.post depending on file_content.
Parmeters
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.
Return type
None
Last updated