fffiloni commited on
Commit
4f265a7
·
verified ·
1 Parent(s): 9059817

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -4
app.py CHANGED
@@ -48,14 +48,33 @@ def process_video(video_path, prompt, num_steps):
48
  subprocess.run(inference_command, check=True)
49
 
50
  # Return the path to the output video
51
- return output_video, warped_vid_path
52
  except subprocess.CalledProcessError as e:
53
 
54
  raise gr.Error(f"An error occurred: {str(e)}")
55
 
56
  with gr.Blocks() as demo:
57
  with gr.Column():
58
- gr.Markdown("# Go-With-The-Flow")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  with gr.Row():
60
  with gr.Column():
61
  input_video = gr.Video(label="Input Video")
@@ -64,12 +83,11 @@ with gr.Blocks() as demo:
64
  submit_btn = gr.Button("Submit")
65
  with gr.Column():
66
  output_video = gr.Video(label="Result")
67
- warped_vid_path = gr.Video(label="Warped noise")
68
 
69
  submit_btn.click(
70
  fn = process_video,
71
  inputs = [input_video, prompt, num_steps],
72
- outputs = [output_video, warped_vid_path]
73
  )
74
 
75
  demo.queue().launch(show_api=False)
 
48
  subprocess.run(inference_command, check=True)
49
 
50
  # Return the path to the output video
51
+ return output_video
52
  except subprocess.CalledProcessError as e:
53
 
54
  raise gr.Error(f"An error occurred: {str(e)}")
55
 
56
  with gr.Blocks() as demo:
57
  with gr.Column():
58
+ gr.Markdown("# Go-With-The-Flow • Cut and Drag")
59
+ gr.HTML("""
60
+ <div style="display:flex;column-gap:4px;">
61
+ <a href="https://github.com/Eyeline-Research/Go-with-the-Flow">
62
+ <img src='https://img.shields.io/badge/GitHub-Repo-blue'>
63
+ </a>
64
+ <a href="https://arxiv.org/abs/2501.08331">
65
+ <img src='https://img.shields.io/badge/ArXiv-Paper-red'>
66
+ </a>
67
+ <a href="https://eyeline-research.github.io/Go-with-the-Flow/">
68
+ <img src='https://img.shields.io/badge/Project-Page-green'>
69
+ </a>
70
+ <a href="https://huggingface.co/spaces/fffiloni/Go-With-The-Flow?duplicate=true">
71
+ <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-sm.svg" alt="Duplicate this Space">
72
+ </a>
73
+ <a href="https://huggingface.co/fffiloni">
74
+ <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/follow-me-on-HF-sm-dark.svg" alt="Follow me on HF">
75
+ </a>
76
+ </div>
77
+ """)
78
  with gr.Row():
79
  with gr.Column():
80
  input_video = gr.Video(label="Input Video")
 
83
  submit_btn = gr.Button("Submit")
84
  with gr.Column():
85
  output_video = gr.Video(label="Result")
 
86
 
87
  submit_btn.click(
88
  fn = process_video,
89
  inputs = [input_video, prompt, num_steps],
90
+ outputs = [output_video]
91
  )
92
 
93
  demo.queue().launch(show_api=False)