Skip to content

Instantly share code, notes, and snippets.

@patryk-oleniuk
Created May 10, 2020 06:14
Show Gist options
  • Save patryk-oleniuk/ed923f0eef55ad80e3c0c3a137042153 to your computer and use it in GitHub Desktop.
Save patryk-oleniuk/ed923f0eef55ad80e3c0c3a137042153 to your computer and use it in GitHub Desktop.
How to embed a website in mlflow artifact viewer
website_embed = '''<!DOCTYPE html>
<html>
<iframe src="https://en.wikipedia.org/wiki/Machine_learning" style='width: 700px; height: 450px' sandbox='allow-same-origin allow-scripts'>
</iframe>
</html>'''
with mlflow.start_run(experiment_id=1, run_name="website_embedding") as run:
with open("output.html", "w") as f:
f.write(website_embed)
mlflow.log_artifact("output.html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment