Refactor UI module and add launcher function

This commit is contained in:
2024-02-22 15:12:56 +01:00
parent 7c9dcb1702
commit 8c76140b38
3 changed files with 7 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
from ui import GenerateUI from ui import launch
from dotenv import load_dotenv from dotenv import load_dotenv
from src.models import init_db from src.models import init_db
@@ -6,5 +6,4 @@ load_dotenv()
if __name__ == "__main__": if __name__ == "__main__":
init_db() init_db()
ui_generator = GenerateUI() launch()
ui_generator.launch_ui()

View File

@@ -1 +1,2 @@
from .gradio_ui import GenerateUI from .gradio_ui import GenerateUI
from .launcher import launch

4
ui/launcher.py Normal file
View File

@@ -0,0 +1,4 @@
from . import GenerateUI
def launch():
ui_generator = GenerateUI()
ui_generator.launch_ui()