czczup commited on
Commit
fedfc71
1 Parent(s): 2e8e8a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -29
app.py CHANGED
@@ -1,32 +1,36 @@
1
- import streamlit as st
2
 
3
- st.set_page_config(layout="wide")
4
 
5
- # Custom CSS to make the iframe full screen
6
- st.markdown(
7
- """
8
- <style>
9
- .fullScreenFrame > iframe {
10
- position: absolute;
11
- width: 100%;
12
- height: 100%;
13
- border: none;
14
- }
15
- .main > div {
16
- padding: 0;
17
- height: 100vh;
18
- }
19
- </style>
20
- """,
21
- unsafe_allow_html=True,
22
- )
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- # Embed the external Streamlit webpage
25
- st.markdown(
26
- """
27
- <div class="fullScreenFrame">
28
- <iframe src="https://internvl.opengvlab.com/"></iframe>
29
- </div>
30
- """,
31
- unsafe_allow_html=True,
32
- )
 
1
+ from flask import Flask, render_template_string
2
 
3
+ app = Flask(__name__)
4
 
5
+ @app.route('/')
6
+ def index():
7
+ return render_template_string('''
8
+ <!DOCTYPE html>
9
+ <html lang="en">
10
+ <head>
11
+ <meta charset="UTF-8">
12
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
13
+ <title>Embed Webpage</title>
14
+ <style>
15
+ body, html {
16
+ margin: 0;
17
+ padding: 0;
18
+ height: 100%;
19
+ overflow: hidden;
20
+ }
21
+ iframe {
22
+ position: absolute;
23
+ width: 100%;
24
+ height: 100%;
25
+ border: none;
26
+ }
27
+ </style>
28
+ </head>
29
+ <body>
30
+ <iframe src="https://internvl.opengvlab.com/"></iframe>
31
+ </body>
32
+ </html>
33
+ ''')
34
 
35
+ if __name__ == '__main__':
36
+ app.run(debug=True)