Walrus operator in Streamlit sharing

I am having troubles running my Python script through Streamlit sharing. The issue is with the walrus operator as in the following error excerpt:

          if load and (load := self.store()):
                            ^
SyntaxError: invalid syntax

However, it is safe to assume that it is a Python version issue. My code works locally while using Python 3.8 but breaks on Streamlit sharing. I believe Streamlit sharing is using Python 3.6 or 3.7. Is it possible to upgrade it so that the code does not result in a SyntaxError?