mhan commited on
Commit
c69dcb9
1 Parent(s): dbf82d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -4,7 +4,12 @@ import streamlit.components.v1 as components
4
 
5
  st.set_page_config(layout="wide")
6
 
7
- backend_url = os.getenv("backend", "https://www.bytedance.com/en/") # 如果环境变量不存在,则使用默认 URL
 
 
 
 
 
8
 
9
  iframe_html = f'<iframe src="{backend_url}" width="100%" height="800"></iframe>'
10
 
 
4
 
5
  st.set_page_config(layout="wide")
6
 
7
+ # List of backend URLs
8
+ backends = ["backend1", "backend2", "backend3", "backend4"]
9
+
10
+ # Randomly select a backend URL
11
+ backend = random.choice(backends)
12
+ backend_url = os.getenv(backend, "https://www.bytedance.com/en/") # 如果环境变量不存在,则使用默认 URL
13
 
14
  iframe_html = f'<iframe src="{backend_url}" width="100%" height="800"></iframe>'
15