From 5a21383c7d05e8c75388ba37cf0d22256da654e5 Mon Sep 17 00:00:00 2001 From: dawoodkhan82 Date: Mon, 26 Jul 2021 17:25:41 -0400 Subject: [PATCH] mlflow integrate --- gradio/interface.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gradio/interface.py b/gradio/interface.py index d574652a9e..23b50a2dfc 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -593,11 +593,10 @@ class Interface: return app, path_to_local_server, share_url - def integrate(self, comet_ml=None, wandb=None): + def integrate(self, comet_ml=None, wandb=None, mlflow=None): if comet_ml is not None: comet_ml.log_other("Created from", "Gradio") if self.share_url is not None: - print("") comet_ml.log_text("gradio: " + self.share_url) comet_ml.end() else: @@ -608,6 +607,13 @@ class Interface: wandb.log({"Gradio panel": wandb.Html('')}) else: print("The WandB integration requires you to `launch(share=True)` first.") + if mlflow is not None: + if self.share_url is not None: + mlflow.log_param("Gradio Interface Share Link", + self.share_url) + else: + mlflow.log_param("Gradio Interface Local Link", + self.local_url)