From 7770380f64119dff5047645b658cb0a75f29e2b6 Mon Sep 17 00:00:00 2001 From: MilesCranmer Date: Wed, 17 Apr 2024 20:42:01 +0100 Subject: [PATCH] refactor(gui): launch code --- gui/app.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gui/app.py b/gui/app.py index 5c5a81b71..9f16f09f3 100644 --- a/gui/app.py +++ b/gui/app.py @@ -282,13 +282,11 @@ def f(*components): return f -class App: - def __init__(self, theme="default") -> None: - with gr.Blocks(theme=theme) as demo: - self.interface = AppInterface(demo) - - demo.launch(debug=True) +def main(): + with gr.Blocks(theme="default") as demo: + _ = AppInterface(demo) + demo.launch(debug=True) if __name__ == "__main__": - app = App() + main()