Spaces:
Running
Running
Add sample images
Browse files- .gitattributes +1 -0
- app.py +26 -7
- samples/cifar10.jpg +3 -0
- samples/ffhq.jpg +3 -0
- samples/imagenet.jpg +3 -0
- samples/pokemon.jpg +3 -0
.gitattributes
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
|
1 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
2 |
*.7z filter=lfs diff=lfs merge=lfs -text
|
3 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -23,7 +23,28 @@ DESCRIPTION = f'''This is a demo for {ORIGINAL_REPO_URL}.
|
|
23 |
For class-conditional models, you can specify the class index.
|
24 |
Index-to-label dictionaries for ImageNet and CIFAR-10 can be found [here](https://raw.githubusercontent.com/autonomousvision/stylegan_xl/main/misc/imagenet_idx2labels.txt) and [here](https://www.cs.toronto.edu/~kriz/cifar.html), respectively.
|
25 |
'''
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
TOKEN = os.environ['TOKEN']
|
29 |
|
@@ -128,12 +149,10 @@ def main():
|
|
128 |
gr.Interface(
|
129 |
func,
|
130 |
[
|
131 |
-
gr.inputs.Radio(
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
label='Model',
|
136 |
-
),
|
137 |
gr.inputs.Number(default=284, label='Class index'),
|
138 |
gr.inputs.Number(default=0, label='Seed'),
|
139 |
gr.inputs.Slider(
|
|
|
23 |
For class-conditional models, you can specify the class index.
|
24 |
Index-to-label dictionaries for ImageNet and CIFAR-10 can be found [here](https://raw.githubusercontent.com/autonomousvision/stylegan_xl/main/misc/imagenet_idx2labels.txt) and [here](https://www.cs.toronto.edu/~kriz/cifar.html), respectively.
|
25 |
'''
|
26 |
+
SAMPLE_IMAGE_DIR = 'https://huggingface.co/spaces/hysts/StyleGAN-XL/resolve/main/samples'
|
27 |
+
ARTICLE = f'''## Generated images
|
28 |
+
- truncation: 0.7
|
29 |
+
### ImageNet
|
30 |
+
- size: 128x128
|
31 |
+
- class index: 0-999
|
32 |
+
- seed: 0
|
33 |
+

|
34 |
+
### CIFAR-10
|
35 |
+
- size: 32x32
|
36 |
+
- class index: 0-9
|
37 |
+
- seed: 0-9
|
38 |
+

|
39 |
+
### FFHQ
|
40 |
+
- size: 256x256
|
41 |
+
- seed: 0-99
|
42 |
+

|
43 |
+
### Pokemon
|
44 |
+
- size: 256x256
|
45 |
+
- seed: 0-99
|
46 |
+

|
47 |
+
'''
|
48 |
|
49 |
TOKEN = os.environ['TOKEN']
|
50 |
|
|
|
149 |
gr.Interface(
|
150 |
func,
|
151 |
[
|
152 |
+
gr.inputs.Radio(model_names,
|
153 |
+
type='value',
|
154 |
+
default='imagenet128',
|
155 |
+
label='Model'),
|
|
|
|
|
156 |
gr.inputs.Number(default=284, label='Class index'),
|
157 |
gr.inputs.Number(default=0, label='Seed'),
|
158 |
gr.inputs.Slider(
|
samples/cifar10.jpg
ADDED
![]() |
Git LFS Details
|
samples/ffhq.jpg
ADDED
![]() |
Git LFS Details
|
samples/imagenet.jpg
ADDED
![]() |
Git LFS Details
|
samples/pokemon.jpg
ADDED
![]() |
Git LFS Details
|