MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / PaddleXPredictor

Class PaddleXPredictor

benchmarks/paddleocr_vl/benchmark.py:45–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44
45class PaddleXPredictor(Predictor):
46 def __init__(self, config_path):
47 from paddlex import create_pipeline
48
49 super().__init__()
50 self.pipeline = create_pipeline(config_path)
51
52 def _predict(self, batch_data):
53 results = list(self.pipeline.predict(batch_data))
54 return "\n\n".join(res._to_markdown(pretty=False)["markdown_texts"] for res in results), len(results)
55
56 def close(self):
57 self.pipeline.close()
58
59
60def monitor_device(gpu_ids, gpu_metrics_list):

Callers 1

benchmark.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected