fffiloni commited on
Commit
64daad5
1 Parent(s): 591578d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -3
app.py CHANGED
@@ -173,10 +173,30 @@ def infer(frameA, frameB):
173
 
174
  return "predicted_flow.jpg", "flofile.flo"
175
 
176
- title="RAFT Optical Flow"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  description="<p style='text-align:center'>PyTorch way to Generate optical flow image & .flo file from 2 consecutive frames with RAFT model</p>"
178
-
179
- with gr.Blocks() as block:
 
 
 
180
  with gr.Column(elem_id="col-container"):
181
  gr.HTML(title)
182
  gr.HTML(description)
 
173
 
174
  return "predicted_flow.jpg", "flofile.flo"
175
 
176
+ title="""
177
+ <div style="text-align: center; max-width: 500px; margin: 0 auto;">
178
+ <div
179
+ style="
180
+ display: inline-flex;
181
+ align-items: center;
182
+ gap: 0.8rem;
183
+ font-size: 1.75rem;
184
+ margin-bottom: 10px;
185
+ "
186
+ >
187
+ <h1 style="font-weight: 600; margin-bottom: 7px;">
188
+ RAFT Optical Flow
189
+ </h1>
190
+ </div>
191
+
192
+ </div>
193
+ """
194
  description="<p style='text-align:center'>PyTorch way to Generate optical flow image & .flo file from 2 consecutive frames with RAFT model</p>"
195
+ css="""
196
+ #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
197
+ a {text-decoration-line: underline; font-weight: 600;}
198
+ """
199
+ with gr.Blocks(css=css) as block:
200
  with gr.Column(elem_id="col-container"):
201
  gr.HTML(title)
202
  gr.HTML(description)