Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/avidhanr/streamlitwebapp

Sample project using Python streamlit package.
https://github.com/avidhanr/streamlitwebapp

python3 streamlit

Last synced: about 1 month ago
JSON representation

Sample project using Python streamlit package.

Awesome Lists containing this project

README

        

## Sample `Streamlit` Project
- Create a new project in `Pycharm` (Recommended)
- Create a new file and name it as `main.py`
- Install the below packages in your project.
```bash
pip install streamlit
```
- Write the below code,
```py
import streamlit as st
import numpy as np

container = st.container()
container.header("About me")
# * Interesting [streamlit]
# container.markdown(
# """
#
# /* Define custom CSS styles */
# .custom-text {
# font-size: 1.5rem; /* Adjust font size as needed */
# font-weight: bold; /* Make text bold */
# }
#
#

Bio:


# """,
# unsafe_allow_html = True
# )
container.text(
"Hello! I'm Vidhan, A Compute Science undergraduate. \nI love to learn new Stuff and upgrade myself"
)
container.markdown(
"""

Vist my github

""",
unsafe_allow_html = True
)
message = st.chat_message("assistant")
message.write("Hello human")
prompt = st.chat_input("Enter something")
if prompt:
st.write(f"User has entered something: {prompt}")
message.bar_chart(np.random.randn(30, 3))
btn = container.button("I'm Feeling lucky!")
if btn:
st.balloons()

```
- Save the code in your file [`main.py`]()
```bash
streamlit run main.py
```
- Open the `localhost:8501` or by clicking it from the terminal
- Thats it your first `Streamlit` web app is ready.
----
# OR
----
- Fork this `repo` and open it in `PyCharm`
- Run the app, alter it, experiment it ([`Streamlit Documentaion`](https://docs.streamlit.io/))
- Project by [`AVidhanR`]()