Spaces:
Runtime error
Runtime error
Commit
·
32a5a14
1
Parent(s):
c2c10fa
changed n_rows to slider with bounds to stop memory issues (hopefully)
Browse files
app.py
CHANGED
@@ -470,7 +470,7 @@ def gen_ims(n_rows):
|
|
470 |
grid = torchvision.utils.make_grid(ims, nrow=int(n_rows)).permute(1, 2, 0).detach().cpu().numpy()
|
471 |
return (grid*255).astype(np.uint8)
|
472 |
iface = gr.Interface(fn=gen_ims,
|
473 |
-
inputs=[gr.inputs.Slider(
|
474 |
outputs=[gr.outputs.Image(type="numpy", label="Generated Images")],
|
475 |
title='Demo for https://huggingface.co/johnowhitaker/orbgan_e1'
|
476 |
)
|
|
|
470 |
grid = torchvision.utils.make_grid(ims, nrow=int(n_rows)).permute(1, 2, 0).detach().cpu().numpy()
|
471 |
return (grid*255).astype(np.uint8)
|
472 |
iface = gr.Interface(fn=gen_ims,
|
473 |
+
inputs=[gr.inputs.Slider(minimum=1, maximum=6, step=1, default=3,label="N rows")],
|
474 |
outputs=[gr.outputs.Image(type="numpy", label="Generated Images")],
|
475 |
title='Demo for https://huggingface.co/johnowhitaker/orbgan_e1'
|
476 |
)
|