Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -158,7 +158,7 @@ article = """
|
|
158 |
</p>
|
159 |
"""
|
160 |
|
161 |
-
gr.Interface(
|
162 |
predict_fn,
|
163 |
inputs=[
|
164 |
gr.inputs.Video(source="webcam"),
|
@@ -175,4 +175,28 @@ gr.Interface(
|
|
175 |
# ['obama.webm', 0, 4],
|
176 |
# ],
|
177 |
allow_flagging=False,
|
178 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
</p>
|
159 |
"""
|
160 |
|
161 |
+
iface_webcam = gr.Interface(
|
162 |
predict_fn,
|
163 |
inputs=[
|
164 |
gr.inputs.Video(source="webcam"),
|
|
|
175 |
# ['obama.webm', 0, 4],
|
176 |
# ],
|
177 |
allow_flagging=False,
|
178 |
+
)
|
179 |
+
|
180 |
+
iface_file = gr.Interface(
|
181 |
+
predict_fn,
|
182 |
+
inputs=[
|
183 |
+
gr.inputs.Video(source="upload"),
|
184 |
+
gr.inputs.Slider(minimum=0, maximum=300, step=1, default=0),
|
185 |
+
gr.inputs.Slider(minimum=1, maximum=4, step=1, default=2),
|
186 |
+
],
|
187 |
+
outputs=gr.outputs.Video(),
|
188 |
+
title='AnimeGANV2 On Videos',
|
189 |
+
description="Applying AnimeGAN-V2 to frames from video clips",
|
190 |
+
article=article,
|
191 |
+
enable_queue=True,
|
192 |
+
# examples=[
|
193 |
+
# ['obama.webm', 0, 4],
|
194 |
+
# ],
|
195 |
+
allow_flagging=False,
|
196 |
+
)
|
197 |
+
|
198 |
+
if __name__ == '__main__':
|
199 |
+
gr.TabbedInterface(
|
200 |
+
interface_list=[iface_file, iface_webcam],
|
201 |
+
tab_names=["From a File!", "From your Webcam!"]
|
202 |
+
).launch()
|