Shot2Story / app.py
Last commit not found
raw
history blame
506 Bytes
import os
import streamlit as st
import streamlit.components.v1 as components
st.set_page_config(layout="wide")
# List of backend URLs
backends = ["backend1", "backend2", "backend3", "backend4"]
# Randomly select a backend URL
backend = random.choice(backends)
backend_url = os.getenv(backend, "https://www.bytedance.com/en/") # 如果环境变量不存在,则使用默认 URL
iframe_html = f'<iframe src="{backend_url}" width="100%" height="800"></iframe>'
components.html(iframe_html, height=800)