k-l-lambda commited on
Commit
a3e1a45
·
1 Parent(s): dbd5035

refined control panel

Browse files
Files changed (2) hide show
  1. app.py +5 -2
  2. web/score-player.css +21 -12
app.py CHANGED
@@ -448,10 +448,13 @@ def build_ui ():
448
  allow_custom_value=True)
449
  prompt = gr.Textbox(label='Metadata prompt', lines=3, value='',
450
  placeholder='extra metadata lines, e.g.\n[key "C major"]\n(optional)')
451
- measures = gr.Number(label='Measures (0 = let model decide)', value=0, precision=0)
452
  with gr.Row():
453
- temperature = gr.Slider(0.0, 2.0, value=1.0, step=0.05, label='temperature')
454
  max_patches = gr.Number(label='max patches', value=1024, precision=0)
 
 
 
455
  seed = gr.Slider(0, 2147483647, value=42, step=1, label='seed')
456
  with gr.Row():
457
  gen_btn = gr.Button('Generate', variant='primary', elem_id='gen-btn')
 
448
  allow_custom_value=True)
449
  prompt = gr.Textbox(label='Metadata prompt', lines=3, value='',
450
  placeholder='extra metadata lines, e.g.\n[key "C major"]\n(optional)')
451
+ gr.Markdown('- Length')
452
  with gr.Row():
453
+ measures = gr.Number(label='Measures (0 = let model decide)', value=0, precision=0)
454
  max_patches = gr.Number(label='max patches', value=1024, precision=0)
455
+ gr.Markdown('- Sampler')
456
+ with gr.Row():
457
+ temperature = gr.Slider(0.0, 2.0, value=1.0, step=0.05, label='temperature')
458
  seed = gr.Slider(0, 2147483647, value=42, step=1, label='seed')
459
  with gr.Row():
460
  gen_btn = gr.Button('Generate', variant='primary', elem_id='gen-btn')
web/score-player.css CHANGED
@@ -1,5 +1,16 @@
1
  /* LilyScript score player — preview + transport. Light theme to match Gradio Soft. */
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  .ls-score-root {
4
  display: flex;
5
  flex-direction: column;
@@ -17,25 +28,23 @@
17
  position: relative;
18
  }
19
 
20
- .ls-status {
21
  font-size: 12px;
22
  color: #888;
23
  min-height: 16px;
24
  margin-bottom: 4px;
25
  }
26
- .ls-status.ls-busy { color: #2b7; }
27
- .ls-status.ls-err { color: #c0392b; }
28
- /* multi-line parse errors: preserve the caret alignment, wrap overflow. The red
29
- color needs !important to beat Gradio's `.prose * { color: ... }`, which sets
30
- color directly on every descendant (so `color: inherit` from .ls-err loses). */
31
- .ls-status.ls-err .ls-err-pre {
32
  margin: 0;
33
  font-family: ui-monospace, Consolas, Monaco, monospace;
34
  font-size: 11px;
35
  line-height: 1.35;
36
  white-space: pre-wrap;
37
  word-break: break-word;
38
- color: #c0392b !important;
39
  }
40
 
41
  .ls-svg {
@@ -99,7 +108,7 @@
99
  border-radius: 8px;
100
  }
101
 
102
- .ls-btn {
103
  border: 1px solid #d0d0d6;
104
  background: #fff;
105
  color: #333;
@@ -113,10 +122,10 @@
113
  align-items: center;
114
  justify-content: center;
115
  }
116
- .ls-btn:hover:not(:disabled) { border-color: #8aa; background: #f0f6ff; }
117
- .ls-btn:disabled { opacity: 0.4; cursor: not-allowed; }
118
 
119
- .ls-time {
120
  font-family: ui-monospace, Consolas, monospace;
121
  font-size: 12px;
122
  color: #555;
 
1
  /* LilyScript score player — preview + transport. Light theme to match Gradio Soft. */
2
 
3
+ /* Gradio's `.gradio-container .prose * { color: var(--body-text-color) }` sets a
4
+ color DIRECTLY on every descendant of our mount, overriding anything we set by
5
+ inheritance and out-specifying a plain class. We mount under id #ls-score, so
6
+ prefixing our color rules with that id (specificity beats two classes) lets them
7
+ win WITHOUT !important. This base rule pins the default text color for the whole
8
+ subtree; the specific rules below override per element. (The SVG ink color is a
9
+ separate concern — see the `.ls-svg svg` block.) */
10
+ #ls-score, #ls-score :where(.ls-status, .ls-btn, .ls-time, .ls-err-pre, span, div, button) {
11
+ color: #333;
12
+ }
13
+
14
  .ls-score-root {
15
  display: flex;
16
  flex-direction: column;
 
28
  position: relative;
29
  }
30
 
31
+ #ls-score .ls-status {
32
  font-size: 12px;
33
  color: #888;
34
  min-height: 16px;
35
  margin-bottom: 4px;
36
  }
37
+ #ls-score .ls-status.ls-busy { color: #2b7; }
38
+ #ls-score .ls-status.ls-err { color: #c0392b; }
39
+ /* multi-line parse errors: preserve the caret alignment, wrap overflow. */
40
+ #ls-score .ls-status.ls-err .ls-err-pre {
 
 
41
  margin: 0;
42
  font-family: ui-monospace, Consolas, Monaco, monospace;
43
  font-size: 11px;
44
  line-height: 1.35;
45
  white-space: pre-wrap;
46
  word-break: break-word;
47
+ color: #c0392b;
48
  }
49
 
50
  .ls-svg {
 
108
  border-radius: 8px;
109
  }
110
 
111
+ #ls-score .ls-btn {
112
  border: 1px solid #d0d0d6;
113
  background: #fff;
114
  color: #333;
 
122
  align-items: center;
123
  justify-content: center;
124
  }
125
+ #ls-score .ls-btn:hover:not(:disabled) { border-color: #8aa; background: #f0f6ff; }
126
+ #ls-score .ls-btn:disabled { opacity: 0.4; cursor: not-allowed; }
127
 
128
+ #ls-score .ls-time {
129
  font-family: ui-monospace, Consolas, monospace;
130
  font-size: 12px;
131
  color: #555;