ynhe commited on
Commit
7fc1b17
1 Parent(s): fbcece0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -2,11 +2,10 @@ import os
2
  import streamlit as st
3
  import streamlit.components.v1 as components
4
 
5
- # 从环境变量中读取 backend 的值
6
- backend_url = os.getenv("backend", "https://default-url.com") # 如果环境变量不存在,则使用默认 URL
 
7
 
8
- # 构造 iframe 的 HTML 代码
9
  iframe_html = f'<iframe src="{backend_url}" width="100%" height="800"></iframe>'
10
 
11
- # 使用 Streamlit 的 HTML 组件来展示 iframe
12
  components.html(iframe_html, height=800)
 
2
  import streamlit as st
3
  import streamlit.components.v1 as components
4
 
5
+ st.set_page_config(layout="wide")
6
+
7
+ backend_url = os.getenv("backend", "https://shlab.org.cn") # 如果环境变量不存在,则使用默认 URL
8
 
 
9
  iframe_html = f'<iframe src="{backend_url}" width="100%" height="800"></iframe>'
10
 
 
11
  components.html(iframe_html, height=800)