Spaces:
Running
Running
Update app.py
Browse files
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 =
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|