Use your cursor to draw a digit below
--
Predicted digit appears here
--
diff --git a/build/lib/gradio/interface.py b/build/lib/gradio/interface.py index 04b1cf628f..91360dcc24 100644 --- a/build/lib/gradio/interface.py +++ b/build/lib/gradio/interface.py @@ -17,7 +17,7 @@ LOCALHOST_IP = '127.0.0.1' INITIAL_WEBSOCKET_PORT = 9200 TRY_NUM_PORTS = 100 -BASE_TEMPLATE = pkg_resources.resource_filename('gradio', 'templates/all_io.html') +BASE_TEMPLATE = pkg_resources.resource_filename('gradio', 'templates/base_template.html') JS_PATH_LIB = pkg_resources.resource_filename('gradio', 'js/') CSS_PATH_LIB = pkg_resources.resource_filename('gradio', 'css/') JS_PATH_TEMP = 'js/' diff --git a/gradio/interface.py b/gradio/interface.py index 04b1cf628f..b5f6f0060d 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -17,7 +17,8 @@ LOCALHOST_IP = '127.0.0.1' INITIAL_WEBSOCKET_PORT = 9200 TRY_NUM_PORTS = 100 -BASE_TEMPLATE = pkg_resources.resource_filename('gradio', 'templates/all_io.html') + +BASE_TEMPLATE = pkg_resources.resource_filename('gradio', 'templates/base_template.html') JS_PATH_LIB = pkg_resources.resource_filename('gradio', 'js/') CSS_PATH_LIB = pkg_resources.resource_filename('gradio', 'css/') JS_PATH_TEMP = 'js/' @@ -54,9 +55,6 @@ class Interface(): self.model_type = model_type def _infer_model_type(self, model): - if callable(model): - return 'function' - try: import sklearn if isinstance(model, sklearn.base.BaseEstimator): @@ -78,6 +76,9 @@ class Interface(): except ImportError: pass + if callable(model): + return 'function' + return None def _build_template(self, temp_dir): diff --git a/gradio/templates/all_io.html b/gradio/templates/base_template.html similarity index 100% rename from gradio/templates/all_io.html rename to gradio/templates/base_template.html diff --git a/gradio/templates/draw_a_digit.html b/gradio/templates/draw_a_digit.html deleted file mode 100644 index 52cf244bb5..0000000000 --- a/gradio/templates/draw_a_digit.html +++ /dev/null @@ -1,108 +0,0 @@ - - - -
- - - - - -