Wiuhh commited on
Commit
cdda156
·
verified ·
1 Parent(s): 6a79ce3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +57 -14
app.py CHANGED
@@ -12,20 +12,63 @@ sys.modules["torchvision.transforms.functional_tensor"] = functional
12
  # --- EMBEDDED CSS FOR STYLING ---
13
  CSS_STYLING = """
14
  :root {
15
- --primary: #6a35ee; --primary-dark: #4a1dcc; --secondary: #00c9ff;
16
- --accent: #ff6b6b; --light: #f8f9ff; --dark: #1a1f36; --text: #4a5568;
17
- --input-background-fill: var(--light) !important;
18
- --input-border-color: #e0e0e0 !important;
19
- --input-label-color: var(--text) !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
- .gradio-container { background: var(--light); font-family: 'Inter', sans-serif; }
22
- #main-title { color: var(--dark); text-align: center; font-size: 2.5rem !important; font-weight: 900; }
23
- #main-subtitle { color: var(--text); text-align: center; font-size: 1rem !important; margin-top: -15px; margin-bottom: 20px; }
24
- #submit-button { background: var(--primary); color: white; font-weight: bold; border-radius: 8px !important; transition: all 0.3s ease; }
25
- #submit-button:hover { background: var(--primary-dark); box-shadow: 0px 4px 15px rgba(106, 53, 238, 0.4); transform: translateY(-2px); }
26
- .gr-image { border: 1px dashed var(--input-border-color) !important; border-radius: 12px !important; min-height: 300px; }
27
- input[type="range"]::-webkit-slider-thumb { background: var(--primary) !important; }
28
- input[type="range"]::-moz-range-thumb { background: var(--primary) !important; }
29
  """
30
 
31
  # --- DOWNLOAD HELPER FUNCTIONS ---
@@ -143,4 +186,4 @@ with gr.Blocks(css=CSS_STYLING, theme=gr.themes.Base()) as demo:
143
 
144
  if __name__ == "__main__":
145
  demo.queue()
146
- demo.launch(share=True) # Set share=False if you don't need a public link
 
12
  # --- EMBEDDED CSS FOR STYLING ---
13
  CSS_STYLING = """
14
  :root {
15
+ --primary: hsl(265, 100%, 61%); /* Accent Purple */
16
+ --secondary: hsl(327, 100%, 72%); /* Accent Pink */
17
+ --blue: hsl(204, 100%, 72%); /* Accent Blue */
18
+ --background-darker: hsl(240, 14%, 3%);
19
+ --background-dark: hsl(240, 14%, 5%);
20
+ --card-background: hsl(240, 10%, 7%);
21
+ --light-text: hsl(240, 5%, 90%);
22
+ --muted-text: hsl(240, 4%, 65%);
23
+ --error-text: hsl(0, 100%, 74%);
24
+ --card-border: hsl(253, 100%, 72%, 0.15);
25
+
26
+ --input-background-fill: var(--card-background) !important;
27
+ --input-border-color: var(--card-border) !important;
28
+ --input-label-color: var(--light-text) !important;
29
+ }
30
+ .gradio-container {
31
+ background: var(--background-dark);
32
+ font-family: 'Inter', sans-serif;
33
+ }
34
+ #main-title {
35
+ color: var(--light-text);
36
+ text-align: center;
37
+ font-size: 2.5rem !important;
38
+ font-weight: 900;
39
+ }
40
+ #main-subtitle {
41
+ color: var(--muted-text);
42
+ text-align: center;
43
+ font-size: 1rem !important;
44
+ margin-top: -15px;
45
+ margin-bottom: 20px;
46
+ }
47
+ #submit-button {
48
+ background: linear-gradient(135deg, var(--primary), var(--secondary));
49
+ color: white;
50
+ font-weight: bold;
51
+ border-radius: 8px !important;
52
+ transition: all 0.3s ease;
53
+ }
54
+ #submit-button:hover {
55
+ box-shadow: 0px 4px 15px rgba(124, 58, 237, 0.4); /* Subtle purple shadow */
56
+ transform: translateY(-2px);
57
+ }
58
+ .gr-image {
59
+ border: 1px solid var(--card-border) !important;
60
+ border-radius: 12px !important;
61
+ min-height: 300px;
62
+ }
63
+ input[type="range"]::-webkit-slider-thumb {
64
+ background: var(--primary) !important;
65
+ }
66
+ input[type="range"]::-moz-range-thumb {
67
+ background: var(--primary) !important;
68
+ }
69
+ .gr-radio > div {
70
+ color: var(--light-text) !important;
71
  }
 
 
 
 
 
 
 
 
72
  """
73
 
74
  # --- DOWNLOAD HELPER FUNCTIONS ---
 
186
 
187
  if __name__ == "__main__":
188
  demo.queue()
189
+ demo.launch(share=True)