Skip to content

Commit aff07a7

Browse files
authored
Update README.md
1 parent c5d927e commit aff07a7

1 file changed

Lines changed: 58 additions & 18 deletions

File tree

14-Project-Streamlit/README.md

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Streamlit Installation and Usage Guide
22

3-
This guide explains how to install Streamlit on both Linux and Windows machines and how to run a basic Streamlit program.
3+
This guide explains how to install Streamlit on both Linux and Windows machines and how to run a Streamlit program.
44

55
---
66

@@ -60,33 +60,73 @@ This guide explains how to install Streamlit on both Linux and Windows machines
6060

6161
## 4. Running a Streamlit Program
6262

63-
1. **Create a Streamlit Python script**
63+
### Instructions to Run `streamlit_1.py` and `streamlit_2.py`
6464

65-
Example: `app.py`
66-
```python
67-
import streamlit as st
65+
### Running `streamlit_1.py`
6866

69-
st.title('Hello, Streamlit!')
70-
st.write('Welcome to your first Streamlit app!')
71-
```
67+
1. **Create and activate a virtual environment:**
68+
```sh
69+
python3 -m venv venv
70+
source venv/bin/activate
71+
```
7272

73-
2. **Run the Streamlit app**
73+
2. **Install required package:**
74+
```sh
75+
pip3 install plotly
76+
```
7477

75-
On both Linux and Windows, use the following command in your terminal:
76-
```bash
77-
streamlit run app.py
78-
```
78+
3. **Run the script (example):**
79+
```sh
80+
python streamlit_1.py
81+
```
7982

80-
3. **Access the app**
83+
4. **Deactivate the virtual environment:**
84+
```sh
85+
deactivate
86+
```
8187

82-
After running the command, Streamlit will provide a local URL (usually `http://localhost:8501`) that you can open in your browser.
88+
5. **(Optional) Remove the virtual environment files:**
89+
```sh
90+
rm -rf venv
91+
```
8392

8493
---
8594

86-
## 5. Additional Resources
95+
### Running `streamlit_2.py`
96+
97+
1. **Create and activate a virtual environment:**
98+
```sh
99+
python3 -m venv venv
100+
source venv/bin/activate
101+
```
102+
103+
2. **Install required packages:**
104+
```sh
105+
pip3 install streamlit
106+
pip3 install plotly
107+
pip3 install statsmodels
108+
```
109+
110+
3. **Run the script (example):**
111+
```sh
112+
python streamlit_2.py
113+
```
114+
115+
4. **Deactivate the virtual environment:**
116+
```sh
117+
deactivate
118+
```
119+
120+
5. **(Optional) Remove the virtual environment files:**
121+
```sh
122+
rm -rf venv
123+
```
124+
125+
---
87126

88-
- [Streamlit Documentation](https://docs.streamlit.io/)
89-
- [Streamlit Community Forum](https://discuss.streamlit.io/)
127+
**Note:**
128+
- Ensure you are in the correct directory before running these commands.
129+
- Removing the `venv` folder will delete the virtual environment and all installed packages.
90130

91131
---
92132

0 commit comments

Comments
 (0)