From 8f779d3a190f13304f7cfa07a72b7c8324c4ed26 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 11 Feb 2025 11:45:23 -0800 Subject: [PATCH] change --- grompy/transpiler.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/grompy/transpiler.py b/grompy/transpiler.py index 362f67a..eecc02c 100644 --- a/grompy/transpiler.py +++ b/grompy/transpiler.py @@ -505,14 +505,8 @@ def transpile(fn: Callable) -> str: if __name__ == "__main__": - # import gradio as gr - # def change_textbox(choice: str): - # if choice == "short": - # return gr.Textbox(lines=2, visible=True), gr.Button(interactive=True) - # elif choice == "long": - # return gr.Textbox(lines=8, visible=True, value="Lorem ipsum dolor sit amet"), gr.Button(interactive=True) - # else: - # return gr.Textbox(visible=False), gr.Button(interactive=False) - - # js_code = transpile(change_textbox) + def filter_rows_by_term(data: list, search_term: str) -> list: + return [row for row in data if search_term in row[0]] + + js_code = transpile(filter_rows_by_term) print(js_code)