Created
May 9, 2025 14:07
-
-
Save Magnus167/0121bd7f26da80f212911e69fec135ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template_string | |
app = Flask(__name__) | |
APP_URL = "http://localhost:8501/" | |
TEMPLATE = f""" | |
<!doctype html> | |
<html> | |
<head> | |
<title>Streamlit-iFRAEM</title> | |
<style>html, body, iframe {{ margin:0; padding:0; height:100%; width:100%; }}</style> | |
</head> | |
<body> | |
<iframe src="{APP_URL}" frameborder="0"></iframe> | |
</body> | |
</html> | |
""" | |
@app.route("/") | |
def index(): | |
return render_template_string(TEMPLATE) | |
if __name__ == "__main__": | |
app.run(host="0.0.0.0", port=8502, debug=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment