From c0765ed92795ad48962bc49453405af5827deea8 Mon Sep 17 00:00:00 2001 From: Ali Abid Date: Thu, 11 Jun 2020 11:25:38 -0700 Subject: [PATCH] interface opts --- demo/basic_text.py | 10 ++++++++-- demo/flip_image.py | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/demo/basic_text.py b/demo/basic_text.py index 4c97b6cca7..2275ddb21c 100644 --- a/demo/basic_text.py +++ b/demo/basic_text.py @@ -6,6 +6,12 @@ def upper(sentence, sentence2): gr.Interface(upper, - ["textbox", "textbox"], - ["textbox", "textbox"], + [ + "textbox", + gr.inputs.Textbox(lines=3, placeholder="hello") + ], + [ + "textbox", + gr.outputs.Textbox(lines=3, placeholder="hello") + ], live=True).launch() diff --git a/demo/flip_image.py b/demo/flip_image.py index 78a0a7d669..a3a9ecbb6a 100644 --- a/demo/flip_image.py +++ b/demo/flip_image.py @@ -11,4 +11,9 @@ def flip2(image): return np.fliplr(image), time() - start -gr.Interface([flip, flip2], "imagein", ["image", "textbox"]).launch() \ No newline at end of file +gr.Interface([flip, flip2], + "imagein", + [ + "image", + gr.outputs.Textbox(lines=1) + ]).launch() \ No newline at end of file