import streamlit as st import base64 def main(): st.markdown("""
温柔电台(星光电台回)
""".format( link_1, base64.b64encode(open(image_path_1, "rb").read()).decode() ), unsafe_allow_html=True, ) audio_file_1 = open(audio_path_1, "rb") audio_bytes_1 = audio_file_1.read() st.audio(audio_bytes_1, format="audio/wav") with col2: st.markdown( """日常杂谈(瞳百科)
""".format( link_2, base64.b64encode(open(image_path_2, "rb").read()).decode() ), unsafe_allow_html=True, ) audio_file_2 = open(audio_path_2, "rb") audio_bytes_2 = audio_file_2.read() st.audio(audio_bytes_2, format="audio/wav") # 星瞳2.0-生日会 # 星瞳2.0-列车回后日谈 col1, col2 = st.columns([1, 1]) image_path_1 = "pic/birthday.jpeg" image_path_2 = "pic/lieche.jpeg" audio_path_1 = "wav/birthday.wav" audio_path_2 = "wav/lieche.wav" link_1 = "https://huggingface.co/spaces/digitalxingtong/Xingtong-birthday-Bert-VITS2" link_2 = "https://huggingface.co/spaces/digitalxingtong/Xingtong-lieche-Bert-VITS2" with col1: st.markdown( """日常杂谈(生日会后谈)
""".format( link_1, base64.b64encode(open(image_path_1, "rb").read()).decode() ), unsafe_allow_html=True, ) audio_file_1 = open(audio_path_1, "rb") audio_bytes_1 = audio_file_1.read() st.audio(audio_bytes_1, format="audio/wav") with col2: st.markdown( """日常杂谈(列车回后日谈)
""".format( link_2, base64.b64encode(open(image_path_2, "rb").read()).decode() ), unsafe_allow_html=True, ) audio_file_2 = open(audio_path_2, "rb") audio_bytes_2 = audio_file_2.read() st.audio(audio_bytes_2, format="audio/wav") #冬牧场 #0317 col1, col2 = st.columns([1, 1]) image_path_1 = "pic/dongmuchang.jpeg" image_path_2 = "pic/0317.jpeg" audio_path_1 = "wav/dmc.wav" audio_path_2 = "wav/3d0317.wav" link_1 = "https://huggingface.co/spaces/digitalxingtong/Xingtong-dmc2-Bert-VITS2" link_2 = "https://huggingface.co/spaces/digitalxingtong/Xingtong-3d0317-Bert-VITS2" with col1: st.markdown( """读书(冬牧场)
""".format( link_1, base64.b64encode(open(image_path_1, "rb").read()).decode() ), unsafe_allow_html=True, ) audio_file_1 = open(audio_path_1, "rb") audio_bytes_1 = audio_file_1.read() st.audio(audio_bytes_1, format="audio/wav") with col2: st.markdown( """3D直播(最米的星老师)
""".format( link_2, base64.b64encode(open(image_path_2, "rb").read()).decode() ), unsafe_allow_html=True, ) audio_file_2 = open(audio_path_2, "rb") audio_bytes_2 = audio_file_2.read() st.audio(audio_bytes_2, format="audio/wav") image_path = "pic2.png" st.image(image_path) st.markdown(""" 1.0版(Archived): : """, unsafe_allow_html=True) with st.expander("点击此处展开/隐藏"): # 星瞳1.0电台直播vera st.markdown(""" 星瞳1.0电台直播版 (2022年8月素材) """, unsafe_allow_html=True) # 常规直播vera st.markdown(""" 星瞳1.0常规直播 Ver.a(2022年4月素材) """, unsafe_allow_html=True) # 常规直播verb st.markdown(""" 星瞳1.0常规直播 Ver.b(2023年2月素材) """, unsafe_allow_html=True) # 常规直播verc st.markdown(""" 星瞳1.0常规直播 Ver.c(2023年6月素材) """, unsafe_allow_html=True) # 常规直播verd st.markdown(""" 星瞳1.0常规直播 Ver.d(2023年10月素材) """, unsafe_allow_html=True) # 常规直播vere st.markdown(""" 星瞳1.0早期星瞳(2022年2月素材) """, unsafe_allow_html=True) # 小王子朗读(常规版) st.markdown(""" 星瞳1.0小王子朗读(常规版) """, unsafe_allow_html=True) # 冬牧场朗读(常规版) st.markdown(""" 星瞳1.0冬牧场朗读(常规版) """, unsafe_allow_html=True) # 甜甜叫花鸡 st.markdown(""" 星瞳1.0甜甜叫花鸡 """, unsafe_allow_html=True) # 小王子朗读(长语音版) st.markdown(""" 星瞳1.0小王子朗读(长语音版) """, unsafe_allow_html=True) # 冬牧场朗读(长语音版) st.markdown(""" 星瞳1.0冬牧场朗读(长语音版) """, unsafe_allow_html=True) if __name__ == "__main__": main()