├── Procfile
├── README.md
├── Steps to follow
├── app.py
├── requirements.txt
└── setup.sh
/Procfile:
--------------------------------------------------------------------------------
1 | web: sh setup.sh && streamlit run app.py
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Streamlit-app
2 | Sample repository for youtube video
3 |
4 |
You can read the 'steps to follow.txt' file and follow those steps to successfuly deploy your Streamlit app on Heroku.
5 |
--------------------------------------------------------------------------------
/Steps to follow:
--------------------------------------------------------------------------------
1 | 1. Create a repository on github and clone in your PC
2 | 2. Navigate to that folder in the terminal
3 | 3. Make a file named app.py
4 | 4. Make a file named Procfile and paste this
5 |
6 | web: sh setup.sh && streamlit run app.py
7 |
8 | 5. Make a file named requirements.txt
9 | 6. Make a file named setup.sh and paste this
10 |
11 |
12 | mkdir -p ~/.streamlit/
13 |
14 | echo "\
15 | [server]\n\
16 | headless = true\n\
17 | port = $PORT\n\
18 | enableCORS = false\n\
19 | \n\
20 | " > ~/.streamlit/config.toml
21 |
22 |
23 | 7. heroku login
24 | heroku create
25 | git add .
26 | git commit -m "Some message"
27 | git push heroku master
28 |
--------------------------------------------------------------------------------
/app.py:
--------------------------------------------------------------------------------
1 | import streamlit as st
2 |
3 | st.title("Hello guys")
4 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | streamlit
2 |
--------------------------------------------------------------------------------
/setup.sh:
--------------------------------------------------------------------------------
1 | mkdir -p ~/.streamlit/
2 |
3 | echo "\
4 | [server]\n\
5 | headless = true\n\
6 | port = $PORT\n\
7 | enableCORS = false\n\
8 | \n\
9 | " > ~/.streamlit/config.toml
10 |
--------------------------------------------------------------------------------