@pytest.mark.skipif((not _SERVE_TESTING), reason="serve libraries aren't installed.")
@mock.patch('flash._IS_TESTING', True)
def test_serve():
    model = SemanticSegmentation(2)
    model._preprocess = SemanticSegmentationPreprocess()
    model.eval()
    model.serve()
@pytest.mark.skipif((not _SERVE_TESTING), reason="serve libraries aren't installed.")
@mock.patch('flash._IS_TESTING', True)
def test_serve():
    model = SemanticSegmentation(2)
    model._preprocess = SemanticSegmentationPreprocess()
    model.eval()
    model.serve()