Views
No views yet
1from gradio_client import Client
2import base64
3
4client = Client("YOUR_USERNAME/cellpose-zero-gpu")
5
6with open("image.png", "rb") as f:
7 img_b64 = base64.b64encode(f.read()).decode()
8
9result = client.predict(
10 image_b64=img_b64,
11 resize=512,
12 max_iter=2000,
13 flow_threshold=0.4,
14 cellprob_threshold=0.0,
15 api_name="/predict_api"
16)