Problem when updating a streamlit Space

Hi! I’ve been facing a strange problem when updating Streamlit Spaces, most recently this one: vivien/depth-aware-caption .

The normal behavior of the Space is the one shown in this screenshot. 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

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)?

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. 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!
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.

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