eienmojiki commited on
Commit
964f774
·
verified ·
1 Parent(s): 51bba18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import subprocess
3
  import os
4
- import spaces
5
 
6
  def get_file_size(file_path):
7
  """Get file size in a human-readable format"""
@@ -16,7 +16,7 @@ def get_file_size(file_path):
16
  return f"{size_bytes:.2f} {unit}"
17
  size_bytes /= 1024
18
 
19
- @spaces.GPU(duration=120)
20
  def compress_video(video_file):
21
  """Compresses the uploaded video using FFmpeg and returns the output video path and file sizes."""
22
  if video_file is None:
@@ -37,8 +37,8 @@ def compress_video(video_file):
37
  # Execute ffmpeg command
38
  command = [
39
  "ffmpeg",
40
- "-hwaccel",
41
- "cuda",
42
  "-i", input_path,
43
  "-vcodec", "libx264",
44
  "-crf", "28",
 
1
  import gradio as gr
2
  import subprocess
3
  import os
4
+ #import spaces
5
 
6
  def get_file_size(file_path):
7
  """Get file size in a human-readable format"""
 
16
  return f"{size_bytes:.2f} {unit}"
17
  size_bytes /= 1024
18
 
19
+ #@spaces.GPU(duration=120)
20
  def compress_video(video_file):
21
  """Compresses the uploaded video using FFmpeg and returns the output video path and file sizes."""
22
  if video_file is None:
 
37
  # Execute ffmpeg command
38
  command = [
39
  "ffmpeg",
40
+ #"-hwaccel",
41
+ #"cuda",
42
  "-i", input_path,
43
  "-vcodec", "libx264",
44
  "-crf", "28",