MCPcopy Create free account
hub / github.com/NanoNets/docstrange / get_processing_mode

Method get_processing_mode

docstrange/extractor.py:291–304  ·  view source on GitHub ↗

Get the current processing mode. Returns: String describing the current processing mode

(self)

Source from the content-addressed store, hash-verified

289 return self.cloud_mode and bool(self.api_key)
290
291 def get_processing_mode(self) -> str:
292 """Get the current processing mode.
293
294 Returns:
295 String describing the current processing mode
296 """
297 if self.cloud_mode and self.api_key:
298 return "cloud"
299 elif self.gpu:
300 return "gpu_forced"
301 elif should_use_gpu_processor():
302 return "gpu_auto"
303 else:
304 return "cloud"
305
306 def _get_processor(self, file_path: str):
307 """Get the appropriate processor for the file.

Callers

nothing calls this directly

Calls 1

should_use_gpu_processorFunction · 0.85

Tested by

no test coverage detected