diff --git a/modules_forge/gradio_compile.py b/modules_forge/gradio_compile.py index aaf1812b..33a57314 100644 --- a/modules_forge/gradio_compile.py +++ b/modules_forge/gradio_compile.py @@ -1,5 +1,13 @@ def gradio_compile(items, prefix): for k, v in items["required"].items(): - a = 0 + if len(v) == 2: + t, d = v + if t == 'INT': + name = prefix + '_' + k + default = int(d['default']) + min = int(d['min']) + max = int(d['max']) + step = int(d.get('step', 1)) + print(f'{name} = gr.Slider(label=\'{name}\', minimum={min}, maximum={max}, step={step}, value={default})') return