# Hugging face spaces restarting

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%3E%5C
**Category:** Beginners\
**Created:** [March 21, 2024, 9:35am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424 "2024-03-21T09:35:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![heyoka955](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@heyoka955](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fheyoka955)%5C
**Post date:** [March 21, 2024, 9:35am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%2F1 "2024-03-21T09:35:37Z")

</div>

If a space is sleeping due to inactivity and if i call the space via API, will this call via API will trigger the restart automatically?

Thank you for your help, would be nice if you can send me some sources to it?

---

<div class="post-metadata">

**Author:** ![Liusuthu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/liusuthu/32/33252_2.png) [@Liusuthu](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLiusuthu)%5C
**Post date:** [March 21, 2024, 2:53pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%2F2 "2024-03-21T14:53:26Z")

</div>

i think you can have a test by yourself, with anyone else’s sleeping spaces.

---

<div class="post-metadata">

**Author:** ![heyoka955](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@heyoka955](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fheyoka955)%5C
**Post date:** [March 21, 2024, 3:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%2F3 "2024-03-21T15:26:54Z")

</div>

i would try it on my own but i have an issue here and get an error?

```auto
from gradio_client import Client

client = Client("akinki1995/catch-me-if-you-can", hf_token="hf_***")
result = client.predict(
		"Hello!!",	# str in 'Input Sentence' Textbox component
		api_name="/predict"
)
print(result)

```

 ![grafik](https://us1.discourse-cdn.com/hellohellohello/original/3X/f/d/fd02d3db3193c81e40dfe838d11f9bd971fa0612.png)

---

<div class="post-metadata">

**Author:** ![Liusuthu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/liusuthu/32/33252_2.png) [@Liusuthu](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLiusuthu)%5C
**Post date:** [March 22, 2024, 1:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%2F4 "2024-03-22T01:37:18Z")

</div>

maybe you can have another try on a non-sleeping space, if it worked, then the result will be clear by contrast.

---

<div class="post-metadata">

**Author:** ![heyoka955](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@heyoka955](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fheyoka955)%5C
**Post date:** [March 22, 2024, 11:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%2F6 "2024-03-22T11:27:24Z")

</div>

on non sleeping space, the spaces are automatically build. I think this goes same for sleeping spaces, right? The api call automatically triggers a restart?

---

<div class="post-metadata">

**Author:** ![heyoka955](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@heyoka955](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fheyoka955)%5C
**Post date:** [March 22, 2024, 2:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%2F7 "2024-03-22T14:20:32Z")

</div>

thank you for your help, best regards 😀

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [March 23, 2024, 2:21am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhugging-face-spaces-restarting%2F78424%2F8 "2024-03-23T02:21:30Z")

</div>

Closed on March 23, 2024, 2:21am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
