zyliu commited on
Commit
0b7be03
·
verified ·
1 Parent(s): 02bf18d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -3
app.py CHANGED
@@ -6,6 +6,26 @@ st.set_page_config(layout="wide")
6
 
7
  backend_url = os.getenv("backend", "https://internvl.opengvlab.com/") # 如果环境变量不存在,则使用默认 URL
8
 
9
- iframe_html = f'<iframe src="{backend_url}" width="100%" height="800"></iframe>'
10
-
11
- components.html(iframe_html, height=800)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  backend_url = os.getenv("backend", "https://internvl.opengvlab.com/") # 如果环境变量不存在,则使用默认 URL
8
 
9
+ iframe_html = """
10
+ <!DOCTYPE html>
11
+ <html>
12
+ <head>
13
+ <title>InternVL</title>
14
+ <style>
15
+ iframe {
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ border: none;
22
+ }
23
+ </style>
24
+ </head>
25
+ <body>
26
+ <iframe src="{{backend_url}}"></iframe>
27
+ </body>
28
+ </html>
29
+ """
30
+ iframe_html = iframe_html.replace("{{backend_url}}", backend_url)
31
+ components.html(iframe_html, height=1200)