Merge pull request #7 from badbye/master

set daemon=False
This commit is contained in:
Dawood Khan 2019-07-21 18:23:03 -07:00 committed by GitHub
commit b2950a55db
2 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import pkg_resources
import requests
import random
import time
from IPython import get_ipython
LOCALHOST_IP = "127.0.0.1"
TRY_NUM_PORTS = 100
@ -134,6 +135,8 @@ class Interface:
Method that calls the relevant method of the model object to make a prediction.
:param preprocessed_input: the preprocessed input returned by the input interface
"""
# print(preprocessed_input.shape)
if self.model_type == "sklearn":
return self.model_obj.predict(preprocessed_input)
elif self.model_type == "keras":
@ -304,7 +307,7 @@ class Interface:
path_to_local_server
) # Open a browser tab with the interface.
if inline:
from IPython.display import IFrame
from IPython.display import IFrame, display
if (
is_colab

View File

@ -276,7 +276,7 @@ def serve_files_in_background(interface, port, directory_to_serve=None):
# except (KeyboardInterrupt, OSError):
# httpd.server_close()
thread = threading.Thread(target=serve_forever, daemon=True)
thread = threading.Thread(target=serve_forever, daemon=False)
thread.start()
return httpd