diff --git a/build/lib/gradio/static/css/style.css b/build/lib/gradio/static/css/style.css index 02dabac5ed..0bf607449a 100644 --- a/build/lib/gradio/static/css/style.css +++ b/build/lib/gradio/static/css/style.css @@ -75,7 +75,7 @@ h4 { cursor: pointer; } .examples > button { - padding: 4px; + padding: 8px 16px; border-radius: 2px; margin-right: 4px; background-color: whitesmoke; diff --git a/demo/tax_calculator.py b/demo/tax_calculator.py index 5398c692b6..5d0dc49086 100644 --- a/demo/tax_calculator.py +++ b/demo/tax_calculator.py @@ -44,4 +44,4 @@ io = gr.Interface( ] ) -io.launch(share=True) \ No newline at end of file +io.launch() \ No newline at end of file diff --git a/gradio/static/css/style.css b/gradio/static/css/style.css index 02dabac5ed..0bf607449a 100644 --- a/gradio/static/css/style.css +++ b/gradio/static/css/style.css @@ -75,7 +75,7 @@ h4 { cursor: pointer; } .examples > button { - padding: 4px; + padding: 8px 16px; border-radius: 2px; margin-right: 4px; background-color: whitesmoke; diff --git a/test/test_interpretation.py b/test/test_interpretation.py index 180af293ac..582091f2a7 100644 --- a/test/test_interpretation.py +++ b/test/test_interpretation.py @@ -10,7 +10,7 @@ class TestDefault(unittest.TestCase): def test_default_text(self): max_word_len = lambda text: max([len(word) for word in text.split(" ")]) text_interface = Interface(max_word_len, "textbox", "label", interpretation="default") - interpretation = text_interface.interpret(["quickest brown fox"])[0] + interpretation = text_interface.interpret(["quickest brown fox"])[0][0] self.assertGreater(interpretation[0][1], 0) # Checks to see if the first word has >0 score. self.assertEqual(interpretation[-1][1], 0) # Checks to see if the last word has 0 score. @@ -20,7 +20,7 @@ class TestDefault(unittest.TestCase): array = np.zeros((100,100)) array[0, 0] = 1 img = encode_array_to_base64(array) - interpretation = img_interface.interpret([img])[0] + interpretation = img_interface.interpret([img])[0][0] self.assertGreater(interpretation[0][0], 0) # Checks to see if the top-left has >0 score. @@ -29,14 +29,14 @@ class TestCustom(unittest.TestCase): max_word_len = lambda text: max([len(word) for word in text.split(" ")]) custom = lambda text: [(char, 1) for char in text] text_interface = Interface(max_word_len, "textbox", "label", interpretation=custom) - result = text_interface.interpret(["quickest brown fox"])[0] + result = text_interface.interpret(["quickest brown fox"])[0][0] self.assertEqual(result[0][1], 1) # Checks to see if the first letter has score of 1. def test_custom_img(self): max_pixel_value = lambda img: img.max() custom = lambda img: img.tolist() img_interface = Interface(max_pixel_value, "image", "label", interpretation=custom) - result = img_interface.interpret([gradio.test_data.BASE64_IMAGE])[0] + result = img_interface.interpret([gradio.test_data.BASE64_IMAGE])[0][0] expected_result = np.asarray(decode_base64_to_image(gradio.test_data.BASE64_IMAGE).convert('RGB')).tolist() self.assertEqual(result, expected_result)