# Problem when updating a streamlit Space

**URL:** <https://discuss.huggingface.co/t/problem-when-updating-a-streamlit-space/17588>\
**Category:** Spaces\
**Created:** [May 6, 2022, 5:58am UTC](https://discuss.huggingface.co/t/problem-when-updating-a-streamlit-space/17588 "2022-05-06T05:58:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivien](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/vivien/32/19623_2.png) [@vivien](https://discuss.huggingface.co/u/vivien)\
**Post date:** [May 6, 2022, 5:58am UTC](https://discuss.huggingface.co/t/problem-when-updating-a-streamlit-space/17588/1 "2022-05-06T05:58:56Z")

</div>

Hi! I’ve been facing a strange problem when updating Streamlit Spaces, most recently this one: [**vivien/depth-aware-caption**](https://huggingface.co/spaces/vivien/depth-aware-caption) .

The normal behavior of the Space is the one shown in this [screenshot](https://twitter.com/vivien000000/status/1521808580990619648?s=20&t=ErAG3yOt5Py2PxZKzpnTTg). However after I updated the Space, it stopped working well: most of the time, not all elements (in particular the picture) are properly displayed and when they are, the app is very slow.

I thought first that this was due to a memory leak or a problem with the Streamlit cache but:

- if I restart the Space, the problem is there right from the beginning
- if I recreate a new Space with exactly the same code, it works OK (cf. **vivien/depth-aware-caption2** [1])
- everything is fine when testing locally

It also happened to me with **vivien/zero-shot-classifier-GPT2-2** (there is “-2” at the end of the Space’s URL because I killed the first Space and recreated an identical one) and **vivien/semanticsearch**. Both Spaces work fine now.

Thank you in advance for any help or insight you could provide! (and by the way, thank you for Spaces which is a great tool)

[1]: Sorry for not providing the link. As a new forum user, I can only include two links

---

<div class="post-metadata">

**Author:** ![nateraw](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nateraw/32/2556_2.png) [@nateraw](https://discuss.huggingface.co/u/nateraw)\
**Post date:** [May 7, 2022, 4:50am UTC](https://discuss.huggingface.co/t/problem-when-updating-a-streamlit-space/17588/2 "2022-05-07T04:50:30Z")

</div>

Hey there, I’m not too sure why you’re experiencing this… Just as a sanity check, are you running a later version of streamlit locally (the latest on PyPi is `1.9.0`) vs the one the space is running with (`1.2.0`)?

---

<div class="post-metadata">

**Author:** ![vivien](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/vivien/32/19623_2.png) [@vivien](https://discuss.huggingface.co/u/vivien)\
**Post date:** [May 7, 2022, 10:28pm UTC](https://discuss.huggingface.co/t/problem-when-updating-a-streamlit-space/17588/3 "2022-05-07T22:28:31Z")

</div>

Hi Nate. Yes, I was using streamlit 1.2.0.  
In the meantime, I noticed a similar problem with this Space: [Clip Demo - a Hugging Face Space by vivien](https://huggingface.co/spaces/vivien/clip). It was working well but it crashed with a `runtime error CPU Memory limit exceeded (16GB)` and I now get this error as soon as I restart it. I also created a new Space with exactly the same code and it works without problem: [Clip Demo - a Hugging Face Space by vivien](https://huggingface.co/spaces/vivien/clip-test)!  
This seems to be the same strange situation that I mentioned in my previous post: a restarted Space doesn’t behave like a new Space with exactly the same code.

---

<div class="post-metadata">

**Author:** ![vivien](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/vivien/32/19623_2.png) [@vivien](https://discuss.huggingface.co/u/vivien)\
**Post date:** [May 19, 2022, 7:43pm UTC](https://discuss.huggingface.co/t/problem-when-updating-a-streamlit-space/17588/4 "2022-05-19T19:43:31Z")

</div>

For the record, the new « factory reboot » option solved this. Thanks!
