Spaces:
Runtime error
Runtime error
| from flask import Flask, render_template_string | |
| app = Flask(__name__) | |
| def index(): | |
| # HTML 内容,包含指向 127.0.0.1:3000 的 iframe | |
| html_content = """ | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Embedded Page</title> | |
| </head> | |
| <body> | |
| <iframe src="http://127.0.0.1:3000" width="100%" height="600"> | |
| <p>Your browser does not support iframes.</p> | |
| </iframe> | |
| </body> | |
| </html> | |
| """ | |
| return render_template_string(html_content) | |
| if __name__ == '__main__': | |
| app.run(host='0.0.0.0', port=7860) | |