fffiloni commited on
Commit
7a6bc70
1 Parent(s): e38439c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -8,8 +8,8 @@ token = os.environ.get('HF_TOKEN')
8
  pix2pix = gr.Blocks.load(name="spaces/fffiloni/instruct-pix2pix-clone", api_key=token)
9
 
10
  def trim_video(video_in, trim_value):
11
- clip = VideoFileClip('Test_video.mp4')
12
- clip1 = clip.subclip((0,00),(trim_value))
13
  clip1.write_videofile('edited.mp4',codec='libx264')
14
  return 'edited.mp4'
15
 
@@ -64,10 +64,11 @@ with gr.Blocks(css='style.css') as demo:
64
  with gr.Column():
65
  prompt = gr.Textbox(placeholder="enter prompt")
66
  video_inp = gr.Video(label="Video source", source="upload", type="filepath")
 
 
67
  with gr.Row():
68
  seed_inp = gr.Number(label="Seed", value=123456)
69
- trim_in = gr.Slider(minimun=2.00, maximum=10.00, step=1.00, value=2.00)
70
- with gr.Column():
71
  video_out = gr.Video(label="Pix2pix video result")
72
  submit_btn = gr.Button("Generate Pix2Pix video")
73
 
 
8
  pix2pix = gr.Blocks.load(name="spaces/fffiloni/instruct-pix2pix-clone", api_key=token)
9
 
10
  def trim_video(video_in, trim_value):
11
+ clip = VideoFileClip(video_in)
12
+ clip1 = clip.subclip((0,00),(trim_value,00))
13
  clip1.write_videofile('edited.mp4',codec='libx264')
14
  return 'edited.mp4'
15
 
 
64
  with gr.Column():
65
  prompt = gr.Textbox(placeholder="enter prompt")
66
  video_inp = gr.Video(label="Video source", source="upload", type="filepath")
67
+
68
+ with gr.Column():
69
  with gr.Row():
70
  seed_inp = gr.Number(label="Seed", value=123456)
71
+ trim_in = gr.Slider(minimun=2, maximum=10, step=1, value=2)
 
72
  video_out = gr.Video(label="Pix2pix video result")
73
  submit_btn = gr.Button("Generate Pix2Pix video")
74