AlekseyCalvin commited on
Commit
925c96e
·
verified ·
1 Parent(s): 89c201f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -17,6 +17,12 @@ TempDir = Path("./temp_tool")
17
  os.makedirs(TempDir, exist_ok=True)
18
  api = HfApi()
19
 
 
 
 
 
 
 
20
  def cleanup_temp():
21
  if TempDir.exists():
22
  shutil.rmtree(TempDir)
@@ -472,7 +478,7 @@ css = """
472
  .container { max-width: 900px; margin: auto; }
473
  """
474
 
475
- with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
476
  gr.Markdown("# 🧰 SOONmerge® Toolkit")
477
  gr.Markdown("Includes: Smart QKV Un-fusing, Post-Hoc EMA, Adapter Merging, Resizing, and Extraction.")
478
 
@@ -530,4 +536,4 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
530
  t4_btn.click(task_resize, [t4_token, t4_in, t4_rank, t4_out], t4_log)
531
 
532
  if __name__ == "__main__":
533
- demo.queue().launch()
 
17
  os.makedirs(TempDir, exist_ok=True)
18
  api = HfApi()
19
 
20
+ def info_log(msg, progress=None):
21
+ print(msg)
22
+ if progress:
23
+ return msg
24
+ return msg
25
+
26
  def cleanup_temp():
27
  if TempDir.exists():
28
  shutil.rmtree(TempDir)
 
478
  .container { max-width: 900px; margin: auto; }
479
  """
480
 
481
+ with gr.Blocks() as demo:
482
  gr.Markdown("# 🧰 SOONmerge® Toolkit")
483
  gr.Markdown("Includes: Smart QKV Un-fusing, Post-Hoc EMA, Adapter Merging, Resizing, and Extraction.")
484
 
 
536
  t4_btn.click(task_resize, [t4_token, t4_in, t4_rank, t4_out], t4_log)
537
 
538
  if __name__ == "__main__":
539
+ demo.queue(max_size=1).launch(css=css)