Spaces:
Runtime error
Runtime error
fix gradio upgrade decrepancy
Browse files
app.py
CHANGED
@@ -136,20 +136,20 @@ def main():
|
|
136 |
global model
|
137 |
model = initialize()
|
138 |
|
139 |
-
gr.Interface(
|
140 |
inference,
|
141 |
gr.Image(type="pil", label='Input'),
|
142 |
-
gr.Image(type="pil", label='Output'
|
143 |
theme=args.theme,
|
144 |
title=TITLE,
|
145 |
description=DESCRIPTION,
|
146 |
article=ARTICLE,
|
147 |
examples=EXAMPLES,
|
148 |
-
|
149 |
-
allow_flagging=args.allow_flagging,
|
150 |
live=args.live
|
151 |
-
)
|
152 |
-
|
|
|
153 |
server_port=args.port,
|
154 |
share=args.share
|
155 |
)
|
|
|
136 |
global model
|
137 |
model = initialize()
|
138 |
|
139 |
+
demo = gr.Interface(
|
140 |
inference,
|
141 |
gr.Image(type="pil", label='Input'),
|
142 |
+
gr.Image(type="pil", label='Output', height=300),
|
143 |
theme=args.theme,
|
144 |
title=TITLE,
|
145 |
description=DESCRIPTION,
|
146 |
article=ARTICLE,
|
147 |
examples=EXAMPLES,
|
148 |
+
flagging_mode=args.allow_flagging,
|
|
|
149 |
live=args.live
|
150 |
+
)
|
151 |
+
demo.queue(max_size=20)
|
152 |
+
demo.launch(
|
153 |
server_port=args.port,
|
154 |
share=args.share
|
155 |
)
|