https://github.com/rodolfoferro/streamlit-example
Example of ML app using Streamlit.
https://github.com/rodolfoferro/streamlit-example
python streamlit
Last synced: 4 months ago
JSON representation
Example of ML app using Streamlit.
- Host: GitHub
- URL: https://github.com/rodolfoferro/streamlit-example
- Owner: RodolfoFerro
- License: mit
- Created: 2020-08-26T21:36:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T19:57:44.000Z (over 1 year ago)
- Last Synced: 2024-09-18T00:14:53.796Z (over 1 year ago)
- Topics: python, streamlit
- Language: Python
- Homepage: https://rodo-sample.streamlit.app/
- Size: 19.5 KB
- Stars: 15
- Watchers: 2
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example of an ML web app using Streamlit 🌱



[](https://twitter.com/rodo_ferro/)
[](https://www.linkedin.com/in/rodolfoferro/)
[](https://docs.google.com/presentation/d/e/2PACX-1vTBfub0FyiWLf_4NEnH7Ob6BHJtQaSsr1iqSC5C8deVtXWEbx9-o8i_03FS-qf6mk0jhKdUno1KtqAs/pub?start=false&loop=false&delayms=3000)
This repository contains code to build a Streamlit web app that serves an Iris classifier.
## Prerequisities
Before you begin, ensure you have met the following requirements:
* You have a _Windows/Linux/Mac_ machine running [Python 3.6+](https://www.python.org/).
* You have installed the latest versions of [`pip`](https://pip.pypa.io/en/stable/installing/) and [`virtualenv`](https://virtualenv.pypa.io/en/stable/installation/) or `conda` ([Anaconda](https://www.anaconda.com/distribution/)).
## Setup
To install the dependencies, you can simply follow this steps.
Clone the project repository:
```bash
git clone https://github.com/RodolfoFerro/streamlit-example.git
cd streamlit-example
```
To create and activate the virtual environment, follow these steps:
**Using `conda`**
```bash
$ conda create -n streamlit python=3.7
# Activate the virtual environment:
$ conda activate streamlit
# To deactivate (when you're done):
(streamlit)$ conda deactivate
```
**Using `virtualenv`**
```bash
# In this case I'm supposing that your latest python3 version is 3.7
$ virtualenv streamlit --python=python3
# Activate the virtual environment:
$ source streamlit/bin/activate
# To deactivate (when you're done):
(streamlit)$ deactivate
```
To install the requirements using `pip`, once the virtual environment is active:
```bash
(streamlit)$ pip install -r requirements.txt
```
#### Running the script
Finally, if you want to run the main script:
```bash
(streamlit)$ streamlit run app.py
```
#### Extend code!
Please feel free to use this repo as a template to extend code!