Kha37lid commited on
Commit
300265f
·
verified ·
1 Parent(s): 6719a18

Update kohya_gui_kaggle.py

Browse files
Files changed (1) hide show
  1. kohya_gui_kaggle.py +4 -4
kohya_gui_kaggle.py CHANGED
@@ -1,4 +1,5 @@
1
- import gradio as gr
 
2
  import os
3
  import argparse
4
  from kohya_gui.class_gui_config import KohyaSSGUIConfig
@@ -15,7 +16,6 @@ from kohya_gui.localization_ext import add_javascript
15
  # Set up logging
16
  log = setup_logging()
17
 
18
-
19
  def UI(**kwargs):
20
  add_javascript(kwargs.get("language"))
21
  css = ""
@@ -39,7 +39,7 @@ def UI(**kwargs):
39
  interface = gr.Blocks(
40
  css=css, title=f"Kohya_ss GUI {release}", theme=gr.themes.Default()
41
  )
42
-
43
  config = KohyaSSGUIConfig(config_file_path=kwargs.get("config_file_path"))
44
 
45
  with interface:
@@ -101,7 +101,6 @@ def UI(**kwargs):
101
  launch_kwargs["debug"] = True
102
  interface.launch(**launch_kwargs, share=False)
103
 
104
-
105
  if __name__ == "__main__":
106
  # torch.cuda.set_per_process_memory_fraction(0.48)
107
  parser = argparse.ArgumentParser()
@@ -154,3 +153,4 @@ if __name__ == "__main__":
154
  headless=args.headless,
155
  language=args.language,
156
  )
 
 
1
+
2
+ import gradio as gr
3
  import os
4
  import argparse
5
  from kohya_gui.class_gui_config import KohyaSSGUIConfig
 
16
  # Set up logging
17
  log = setup_logging()
18
 
 
19
  def UI(**kwargs):
20
  add_javascript(kwargs.get("language"))
21
  css = ""
 
39
  interface = gr.Blocks(
40
  css=css, title=f"Kohya_ss GUI {release}", theme=gr.themes.Default()
41
  )
42
+
43
  config = KohyaSSGUIConfig(config_file_path=kwargs.get("config_file_path"))
44
 
45
  with interface:
 
101
  launch_kwargs["debug"] = True
102
  interface.launch(**launch_kwargs, share=False)
103
 
 
104
  if __name__ == "__main__":
105
  # torch.cuda.set_per_process_memory_fraction(0.48)
106
  parser = argparse.ArgumentParser()
 
153
  headless=args.headless,
154
  language=args.language,
155
  )
156
+