@@ -190,21 +190,15 @@ def _process_image_url(self, route: str, project_id: str, published_name: str, u
190190
191191 body = json .dumps ({"url" : url })
192192 result = _run_request_with_retry (endpoint , body , headers )
193- result_text = result .text
194-
195- return ImagePrediction (result_text )
193+ return ImagePrediction (result .text )
196194
197195 def _process_image (self , route : str , project_id : str , published_name : str , image_data : bytearray , store : bool , application ):
198196 endpoint = self ._format_endpoint (route , project_id , published_name , store , application )
199197
200198 headers = {"Content-Type" : "application/octet-stream" , "Prediction-Key" : self ._prediction_key }
201199
202200 result = _run_request_with_retry (endpoint , image_data , headers )
203- result_text = result .text
204-
205- print (result_text )
206-
207- return ImagePrediction (result_text )
201+ return ImagePrediction (result .text )
208202
209203 def _classify_image_url (self , project_id : str , published_name : str , url : str , store : bool , application ):
210204 return self ._process_image_url (self ._classify_image_url_route , project_id , published_name , url , store , application )
0 commit comments