From 58c60d9fa23fe69f86b08bf7fb90c99d8090fc94 Mon Sep 17 00:00:00 2001 From: Ali Abid Date: Thu, 2 Jul 2020 14:00:33 -0700 Subject: [PATCH] support URL --- gradio/inputs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gradio/inputs.py b/gradio/inputs.py index 959a217bb7..7985e5a6c2 100644 --- a/gradio/inputs.py +++ b/gradio/inputs.py @@ -308,7 +308,10 @@ class Image(AbstractInput): return array def process_example(self, example): - return preprocessing_utils.convert_file_to_base64(example) + if os.path.exists(example) + return preprocessing_utils.convert_file_to_base64(example) + else: + return example class Microphone(AbstractInput):