# On restart ZeroGPU not working but on CPU it works

**URL:** <https://discuss.huggingface.co/t/on-restart-zerogpu-not-working-but-on-cpu-it-works/164979>\
**Category:** Spaces\
**Created:** [July 29, 2025, 4:31pm UTC](https://discuss.huggingface.co/t/on-restart-zerogpu-not-working-but-on-cpu-it-works/164979 "2025-07-29T16:31:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [July 29, 2025, 9:48pm UTC](https://discuss.huggingface.co/t/on-restart-zerogpu-not-working-but-on-cpu-it-works/164979/2 "2025-07-29T21:48:45Z")

</div>

It started working after turning off the cache for Example for now.

```py
iface = gr.Interface(
    fn=process_input,
    inputs=[
        gr.Image(label="Upload Image", type="pil"), # File input as PIL Image
    ],
    outputs=gr.Image(type="pil", label="Output (Image)"), # Show output as an image
    examples=default_images,
    cache_examples=False, # <=
    title="Strawberry Disease Detection",
    description="This application detects diseases in strawberries using a trained YOLOX model. Upload an image, video, or use your webcam for analysis."
)

```

> **[app.py · PERCEIVE-Demos/StrawberryDiseaseDetector at main](https://huggingface.co/spaces/PERCEIVE-Demos/StrawberryDiseaseDetector/blob/main/app.py#L75)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

_[View the full topic](https://discuss.huggingface.co/t/on-restart-zerogpu-not-working-but-on-cpu-it-works/164979)._
