import streamlit as st
import pandas as pd
# 이미지 처리를 위한 라이브러리
from PIL import Image
def main() :
img = Image.open('data/image_03.jpg')
print(img)
st.image(img)
st.image(img, use_column_width=True) <== 화면 꽉 차게 사진 조정
# st.image()
video_file = open('data/Waves.mp4','rb')
st.video(video_file)
# audio_file = open('data/song.mp3', 'rb')
# st.audio(audio_file.read(), format='audio/mp3')
if __name__ == '__main__' :
main()
반응형
'Streamlit' 카테고리의 다른 글
[st] app8 : 파일 저장(업로드) 함수 만들기, directory, title, subheader, sidebar, selectbox, file_uploader, (0) | 2021.12.14 |
---|---|
[st] app6 : text_input, text_area, number_input, date_input, time_input, password, color_picker (0) | 2021.12.14 |
[st] app4 -2 : radio, selectbox, slider, write, expander, text (0) | 2021.12.14 |
[st] app4 -1 : st.button() (0) | 2021.12.14 |
[st] app3 : 함수만들기 (0) | 2021.12.14 |