from pipeline import DocumentClassifier def main(): classifier = DocumentClassifier() image_paths = [ "path/to/image1.jpg", "path/to/image2.png", "path/to/image3.jpeg", ] results = classifier.predict(image_paths) for result in results: print(f"\nImage: {result['image_path']}") if result['error_response']: print(f"Error: {result['error_response']}") else: print("Predictions:") sorted_predictions = sorted(result['predictions'].items(), key=lambda x: x[1], reverse=True) for class_name, probability in sorted_predictions: print(f" {class_name}: {probability:.4f}") classifier.unload() if __name__ == "__main__": main()