prithivMLmods commited on
Commit
90b93ee
·
verified ·
1 Parent(s): a92bb77

update app

Browse files
Files changed (1) hide show
  1. app.py +72 -2
app.py CHANGED
@@ -27,6 +27,76 @@ import shutil
27
  import uuid
28
  import zipfile
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  # META: CUDA_CHECK / GPU_INFO
32
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -433,7 +503,7 @@ css = '''
433
  #speed_status{padding: .5em; border-radius: 5px; margin: 1em 0}
434
  '''
435
 
436
- with gr.Blocks(theme="bethecloud/storj_theme", css=css, delete_cache=(240, 240)) as app:
437
  title = gr.HTML("""<h1>Qwen Image LoRA DLC⛵</h1>""", elem_id="title")
438
  selected_index = gr.State(None)
439
 
@@ -536,4 +606,4 @@ with gr.Blocks(theme="bethecloud/storj_theme", css=css, delete_cache=(240, 240))
536
  )
537
 
538
  app.queue()
539
- app.launch(share=False, ssr_mode=False, show_error=True)
 
27
  import uuid
28
  import zipfile
29
 
30
+ from gradio.themes import Soft
31
+ from gradio.themes.utils import colors, fonts, sizes
32
+
33
+ colors.orange_red = colors.Color(
34
+ name="orange_red",
35
+ c50="#FFF0E5",
36
+ c100="#FFE0CC",
37
+ c200="#FFC299",
38
+ c300="#FFA366",
39
+ c400="#FF8533",
40
+ c500="#FF4500",
41
+ c600="#E63E00",
42
+ c700="#CC3700",
43
+ c800="#B33000",
44
+ c900="#992900",
45
+ c950="#802200",
46
+ )
47
+
48
+ class OrangeRedTheme(Soft):
49
+ def __init__(
50
+ self,
51
+ *,
52
+ primary_hue: colors.Color | str = colors.gray,
53
+ secondary_hue: colors.Color | str = colors.orange_red, # Use the new color
54
+ neutral_hue: colors.Color | str = colors.slate,
55
+ text_size: sizes.Size | str = sizes.text_lg,
56
+ font: fonts.Font | str | Iterable[fonts.Font | str] = (
57
+ fonts.GoogleFont("Outfit"), "Arial", "sans-serif",
58
+ ),
59
+ font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
60
+ fonts.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace",
61
+ ),
62
+ ):
63
+ super().__init__(
64
+ primary_hue=primary_hue,
65
+ secondary_hue=secondary_hue,
66
+ neutral_hue=neutral_hue,
67
+ text_size=text_size,
68
+ font=font,
69
+ font_mono=font_mono,
70
+ )
71
+ super().set(
72
+ background_fill_primary="*primary_50",
73
+ background_fill_primary_dark="*primary_900",
74
+ body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
75
+ body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
76
+ button_primary_text_color="white",
77
+ button_primary_text_color_hover="white",
78
+ button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
79
+ button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
80
+ button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_700)",
81
+ button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_600)",
82
+ button_secondary_text_color="black",
83
+ button_secondary_text_color_hover="white",
84
+ button_secondary_background_fill="linear-gradient(90deg, *primary_300, *primary_300)",
85
+ button_secondary_background_fill_hover="linear-gradient(90deg, *primary_400, *primary_400)",
86
+ button_secondary_background_fill_dark="linear-gradient(90deg, *primary_500, *primary_600)",
87
+ button_secondary_background_fill_hover_dark="linear-gradient(90deg, *primary_500, *primary_500)",
88
+ slider_color="*secondary_500",
89
+ slider_color_dark="*secondary_600",
90
+ block_title_text_weight="600",
91
+ block_border_width="3px",
92
+ block_shadow="*shadow_drop_lg",
93
+ button_primary_shadow="*shadow_drop_lg",
94
+ button_large_padding="11px",
95
+ color_accent_soft="*primary_100",
96
+ block_label_background_fill="*primary_200",
97
+ )
98
+
99
+ orange_red_theme = OrangeRedTheme()
100
 
101
  # META: CUDA_CHECK / GPU_INFO
102
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
503
  #speed_status{padding: .5em; border-radius: 5px; margin: 1em 0}
504
  '''
505
 
506
+ with gr.Blocks(theme=orange_red_theme, css=css, delete_cache=(240, 240)) as app:
507
  title = gr.HTML("""<h1>Qwen Image LoRA DLC⛵</h1>""", elem_id="title")
508
  selected_index = gr.State(None)
509
 
 
606
  )
607
 
608
  app.queue()
609
+ app.launch(mcp_server=True, ssr_mode=False, show_error=True)