Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
de5ed42
1
Parent(s):
1b3d453
Add the resolution value for examples.
Browse files
app.py
CHANGED
|
@@ -74,7 +74,14 @@ examples = [[_] for _ in glob('materials/examples/*')][:]
|
|
| 74 |
N = 1
|
| 75 |
ipt = [gr.Image() for _ in range(N)]
|
| 76 |
opt = [gr.Image() for _ in range(N)]
|
|
|
|
|
|
|
| 77 |
ipt += [gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `512x512`. Higher resolutions can be much slower for inference.", label="Resolution")]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
demo = gr.Interface(
|
| 79 |
fn=predict,
|
| 80 |
inputs=ipt,
|
|
|
|
| 74 |
N = 1
|
| 75 |
ipt = [gr.Image() for _ in range(N)]
|
| 76 |
opt = [gr.Image() for _ in range(N)]
|
| 77 |
+
|
| 78 |
+
# Add the option of resolution in a text box.
|
| 79 |
ipt += [gr.Textbox(lines=1, placeholder="Type the resolution (`WxH`) you want, e.g., `512x512`. Higher resolutions can be much slower for inference.", label="Resolution")]
|
| 80 |
+
for idx_example, example in enumerate(examples):
|
| 81 |
+
examples[idx_example].append('1024x1024')
|
| 82 |
+
examples.append(examples[-1].copy())
|
| 83 |
+
examples[-1][1] = '512x512'
|
| 84 |
+
|
| 85 |
demo = gr.Interface(
|
| 86 |
fn=predict,
|
| 87 |
inputs=ipt,
|