owiedotch commited on
Commit
77fcd66
1 Parent(s): 73fdeaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,7 +26,7 @@ cancel_encode = False
26
  cancel_decode = False
27
  cancel_stream = False
28
 
29
- @spaces.GPU(duration=250)
30
  def encode_audio(audio_file_path):
31
  global cancel_encode
32
 
@@ -82,7 +82,7 @@ def handle_encode_output(file_path):
82
  return None, gr.Markdown("Encoding failed. Please check the input file and try again.", visible=True)
83
  return file_path, gr.Markdown(visible=False)
84
 
85
- @spaces.GPU(duration=250)
86
  def decode_audio(encoded_file_path):
87
  global cancel_decode
88
 
@@ -123,7 +123,7 @@ def decode_audio(encoded_file_path):
123
  finally:
124
  cancel_decode = False # Reset cancel flag after decoding
125
 
126
- @spaces.GPU(duration=250)
127
  async def stream_decode_audio(encoded_file_path) -> Generator[tuple, None, None]:
128
  global cancel_stream
129
 
 
26
  cancel_decode = False
27
  cancel_stream = False
28
 
29
+ @spaces.GPU(duration=30)
30
  def encode_audio(audio_file_path):
31
  global cancel_encode
32
 
 
82
  return None, gr.Markdown("Encoding failed. Please check the input file and try again.", visible=True)
83
  return file_path, gr.Markdown(visible=False)
84
 
85
+ @spaces.GPU(duration=30)
86
  def decode_audio(encoded_file_path):
87
  global cancel_decode
88
 
 
123
  finally:
124
  cancel_decode = False # Reset cancel flag after decoding
125
 
126
+ @spaces.GPU(duration=30)
127
  async def stream_decode_audio(encoded_file_path) -> Generator[tuple, None, None]:
128
  global cancel_stream
129