Mahiruoshi commited on
Commit
2a85fa1
1 Parent(s): f0fcc63

Create launch.py

Browse files
Files changed (1) hide show
  1. launch.py +24 -0
launch.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, render_template_string
2
+
3
+ app = Flask(__name__)
4
+
5
+ @app.route('/')
6
+ def index():
7
+ # HTML 内容,包含指向 127.0.0.1:3000 的 iframe
8
+ html_content = """
9
+ <!DOCTYPE html>
10
+ <html>
11
+ <head>
12
+ <title>Embedded Page</title>
13
+ </head>
14
+ <body>
15
+ <iframe src="http://127.0.0.1:3000" width="100%" height="600">
16
+ <p>Your browser does not support iframes.</p>
17
+ </iframe>
18
+ </body>
19
+ </html>
20
+ """
21
+ return render_template_string(html_content)
22
+
23
+ if __name__ == '__main__':
24
+ app.run(host='0.0.0.0', port=7860)