본문 바로가기
Python

[Streamlit] streamlit을 이용해서 간단한 머신러닝 web-app 만들고 배포 및 공유하기

by Chandler.j 2021. 12. 7.
반응형

fig1. title

#0. streamlit을 사용해서 간단한 machine learning app 구현

#1. streamlit 회원가입

#2. streamlit, github repository 연결

#3. streamlit cloud에 new app 추가

##3-1. 초기설정

##3-2. cloud python 환경설정, requirements.txt

#4. app 실행 확인


#0. streamlit을 사용해서 간단한 machine learning app 구현

이전글 참고,

2021.09.17 - [Data Insider] - [linux] [Streamlit] streamlit을 이용해서간단한 머신러닝 사용 앱 구현하기

 

[linux] [Streamlit] streamlit을 이용해서간단한 머신러닝 사용 앱 구현하기

index 1. data scientist life cycle 2. install streamlit 3. edit config file 4. run .py file 1. data scientist life cycle 데이터 사이언스를 한다면 프로젝트 단위로 위 사이클에서 크게 벗어나지 않을..

datainsider.tistory.com


#1. streamlit 회원가입

streamlit 사이트에 접속 후 회원가입 진행

https://streamlit.io/

 

Streamlit • The fastest way to build and share data apps

Streamlit is an open-source app framework for Machine Learning and Data Science teams. Create beautiful data apps in hours, not weeks. All in pure Python. All for free.

streamlit.io


#2. streamlit, github 계정 연결

streamlit의 계정과 github의 계정을 연동시켜준다.연동을 시켜 준 후 로그인을 하면 다음과 같은 화면을 볼 수 있다.

fig2. github과 연동 후 로그인 시 화면


#3. streamlit cloud에 new app 추가

로그인 화면에서 New app 탭을 눌러준다.

##3-1. 초기설정

위 화면에서 github의 repository를 연결branch 선택제작한 streamlit 파일 이름 지정

##3-2. cloud python 환경설정, requirements.txt

Advanced settings...을 클릭해서 python 버전을 선택할 수 있다. (3.7, 3.8, 3.9)

package dependency 들도 고려해줘야 하는데 이파일도 repository에 함께 있어야 한다.

requirements.txt 파일명으로 다음과 같이 패키지의 특정 버전을 입력해 줄 수 있다.


#4. app 실행 확인

부여된 URL로 앱을 실제로 사용해 볼 수 있다.

https://share.streamlit.io/eunchanj/eunchanj/main/streamlit.py

 

https://share.streamlit.io/eunchanj/eunchanj/main/streamlit.py

 

share.streamlit.io


 

전체 참고 : 

https://docs.streamlit.io/streamlit-cloud/get-started/deploy-an-app

 

Streamlit Docs

Join the community Streamlit is more than just a way to make data apps, it’s also a community of creators that share their apps and ideas and help each other make their work better. Please come join us on the community forum. We love to hear your questio

docs.streamlit.io

 


TOP

Designed by 티스토리