Skip to content

Instantly share code, notes, and snippets.

@Magnus167
Created May 9, 2025 14:07
Show Gist options
  • Save Magnus167/0121bd7f26da80f212911e69fec135ed to your computer and use it in GitHub Desktop.
Save Magnus167/0121bd7f26da80f212911e69fec135ed to your computer and use it in GitHub Desktop.
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