tessl install tessl/pypi-modal@1.1.0Python client library for Modal, a serverless cloud computing platform that enables developers to run Python code in the cloud with on-demand access to compute resources.
Agent Success
Agent success rate when using this tile
85%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.6x
Baseline
Agent success rate without this tile
53%
Build a serverless image classification service that efficiently processes multiple image classification requests using batch processing.
You're building an image classification API that receives many individual image classification requests from clients. Each client sends a single image URL and expects a classification result. However, the underlying model performs better when processing multiple images at once.
The service should automatically batch individual classification requests together for efficient processing, even though clients send requests one at a time.
Create a web endpoint that:
image_url fieldclass field containing the predicted class nameImplement a classification function that:
class field @test@generates
# Modal app that exposes a web endpoint for image classification
# POST endpoint accepts: {"image_url": "https://example.com/image.jpg"}
# Returns: {"class": "cat"}Provides serverless cloud compute capabilities for running the classification service.