The error message you provided indicates that Streamlit Community Cloud expects a raw Python (.py) file to run the app.
Can you please double-check that the main file you’re trying to run with Streamlit has a .py extension? For instance, it should be named app.py or something similar.
Oh! Thank you Charly @Charly_Wargnier !
According to your answer, I found the problem!
The problem is that I have used the “first streamlit app.py” as my python file name, which might cause the scc(Streamlit community cloud) failed to identify my file extension.
So I changed it into “first_streamlit_app.py” and reconstructed my github repository and launched it again into my scc.
And the problem solved !
Thank you for your answer which gave me a right direction to solve this problem. I am still not very clear about the essence of this problem, but the main issue should be in my file naming.