Spaces:
Runtime error
Runtime error
Update for gradio 3.0
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🌖
|
|
4 |
colorFrom: red
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
4 |
colorFrom: red
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.0.2
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
app.py
CHANGED
@@ -27,10 +27,6 @@ features by the [DeepDanbooru](https://github.com/KichangKim/DeepDanbooru)
|
|
27 |
model.
|
28 |
|
29 |
Expected execution time on Hugging Face Spaces: 25s
|
30 |
-
|
31 |
-
Known issues:
|
32 |
-
- The `Seed` table in the output doesn't refresh properly in gradio 2.9.1.
|
33 |
-
https://github.com/gradio-app/gradio/issues/921
|
34 |
'''
|
35 |
ARTICLE = None
|
36 |
|
@@ -39,7 +35,7 @@ TOKEN = os.environ['TOKEN']
|
|
39 |
|
40 |
def parse_args() -> argparse.Namespace:
|
41 |
parser = argparse.ArgumentParser()
|
42 |
-
parser.add_argument('--theme', type=str
|
43 |
parser.add_argument('--live', action='store_true')
|
44 |
parser.add_argument('--share', action='store_true')
|
45 |
parser.add_argument('--port', type=int)
|
@@ -47,7 +43,6 @@ def parse_args() -> argparse.Namespace:
|
|
47 |
dest='enable_queue',
|
48 |
action='store_false')
|
49 |
parser.add_argument('--allow-flagging', type=str, default='never')
|
50 |
-
parser.add_argument('--allow-screenshot', action='store_true')
|
51 |
return parser.parse_args()
|
52 |
|
53 |
|
@@ -140,9 +135,7 @@ def run(
|
|
140 |
ncols * image_size, 3)
|
141 |
seeds = np.asarray(seeds).reshape(nrows, ncols)
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
return res, seeds, seed_text
|
146 |
|
147 |
|
148 |
def main():
|
@@ -179,14 +172,12 @@ def main():
|
|
179 |
[
|
180 |
gr.outputs.Image(type='numpy', label='Output'),
|
181 |
gr.outputs.Dataframe(type='numpy', label='Seed'),
|
182 |
-
gr.outputs.Textbox(label='Seed (text)'),
|
183 |
],
|
184 |
examples=examples,
|
185 |
title=TITLE,
|
186 |
description=DESCRIPTION,
|
187 |
article=ARTICLE,
|
188 |
theme=args.theme,
|
189 |
-
allow_screenshot=args.allow_screenshot,
|
190 |
allow_flagging=args.allow_flagging,
|
191 |
live=args.live,
|
192 |
).launch(
|
|
|
27 |
model.
|
28 |
|
29 |
Expected execution time on Hugging Face Spaces: 25s
|
|
|
|
|
|
|
|
|
30 |
'''
|
31 |
ARTICLE = None
|
32 |
|
|
|
35 |
|
36 |
def parse_args() -> argparse.Namespace:
|
37 |
parser = argparse.ArgumentParser()
|
38 |
+
parser.add_argument('--theme', type=str)
|
39 |
parser.add_argument('--live', action='store_true')
|
40 |
parser.add_argument('--share', action='store_true')
|
41 |
parser.add_argument('--port', type=int)
|
|
|
43 |
dest='enable_queue',
|
44 |
action='store_false')
|
45 |
parser.add_argument('--allow-flagging', type=str, default='never')
|
|
|
46 |
return parser.parse_args()
|
47 |
|
48 |
|
|
|
135 |
ncols * image_size, 3)
|
136 |
seeds = np.asarray(seeds).reshape(nrows, ncols)
|
137 |
|
138 |
+
return res, seeds
|
|
|
|
|
139 |
|
140 |
|
141 |
def main():
|
|
|
172 |
[
|
173 |
gr.outputs.Image(type='numpy', label='Output'),
|
174 |
gr.outputs.Dataframe(type='numpy', label='Seed'),
|
|
|
175 |
],
|
176 |
examples=examples,
|
177 |
title=TITLE,
|
178 |
description=DESCRIPTION,
|
179 |
article=ARTICLE,
|
180 |
theme=args.theme,
|
|
|
181 |
allow_flagging=args.allow_flagging,
|
182 |
live=args.live,
|
183 |
).launch(
|