Update app.py
Browse files
app.py
CHANGED
@@ -175,4 +175,14 @@ def infer(frameA, frameB):
|
|
175 |
|
176 |
description="<p style='text-align:center'>PyTorch way to Generate optical flow image & .flo file from 2 consecutive frames with RAFT model</p>"
|
177 |
|
178 |
-
gr.Interface(fn=infer,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
description="<p style='text-align:center'>PyTorch way to Generate optical flow image & .flo file from 2 consecutive frames with RAFT model</p>"
|
177 |
|
178 |
+
gr.Interface(fn=infer,
|
179 |
+
inputs=[
|
180 |
+
gr.Image(source="upload", type="filepath", label="frame 1"),
|
181 |
+
gr.Image(source="upload", type="filepath", label="frame 2")],
|
182 |
+
outputs=[
|
183 |
+
gr.Image(label="flow image"),
|
184 |
+
gr.Files(label="flow file")],
|
185 |
+
title="RAFT Optical Flow",
|
186 |
+
description=description,
|
187 |
+
examples=[["basket1.jpg", "basket2.jpg"]]
|
188 |
+
).launch()
|