Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Hardware
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
Akoda35
/
PyRunner
like
0
Paused
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
PyRunner
/
services
/
image_agent.py
Akoda35
Create services/image_agent.py
768009c
verified
about 2 months ago
Raw
Download with hf CLI
Copy download link
History
Blame
Contribute
Delete
Safe
198 Bytes
from
PIL
import
Image
class
ImageAgent
:
def
resize
(
self, path, output
):
image = Image.
open
(path)
image.thumbnail((
1024
,
1024
))
image.save(output)
return
output