Nothing shows on the browser when using "write" or "title" function, beginner using VS code 1.45.1, streamline 0.61.0, python 3.7.3 and Safari

Hello! I am new to this and I am taking a course on Coursera that uses Streamlit and Python to build a small binary classification web app. The following code should display nothing but two lines of text:

I am using:
Condo
VS code: 1.45.1
Streamlit: 0.61.0
Python: 3.7.3
Safari: 13.0.5 (15608.5.11)

However, the browser page looks like this:

I made sure I saved the code. I have re-run the page several time as well. There is no other file under the same name in the directory.

This has been quite frustrating. I do not understand how it is only several lines but it does not work. Thanks so much for any tips and help!

I also have a side question. When I start streamlit in the terminal, how do exit it? When the terminal looks like this:


Is there any way I could exit it and return to writing command line prompt with the β€˜$’ dollar sign?

Much appreciated!

On Mac, you hit the Apple Command button ⌘ and C at the same time. If not, try Ctrl-C.

In terms of your installation, are you able to run streamlit hello demo?

Hi! Thanks for the reply! Ctrl-C works for me.

Yes I can run streamlit hello demo.

Interesting, your snippet works for me:

Maybe close your shell and re-run streamlit run app.py or rename app.py to something else just to make sure the name isn’t clashing? Not really sure what to suggest here, your code seems pretty straightforward.

thanks for testing it out!
It is all good now! I think there was a problem with VS code not saving properly.

1 Like