Kr08 commited on
Commit
819f6d1
·
verified ·
1 Parent(s): b360956

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -57,11 +57,11 @@ def process_with_fallback(func, *args, **kwargs):
57
  else:
58
  raise
59
 
60
- @spaces.GPU
61
  def transcribe_audio(audio_file, translate, model_size, use_diarization):
62
  return process_with_fallback(process_audio, audio_file, translate=translate, model_size=model_size, use_diarization=use_diarization)
63
 
64
- @spaces.GPU
65
  def summarize_text(text):
66
  summarizer = load_summarization_model()
67
  try:
@@ -72,7 +72,7 @@ def summarize_text(text):
72
  summary = "Error occurred during summarization. Please try again."
73
  return summary
74
 
75
- @spaces.GPU
76
  def process_and_summarize(audio_file, translate, model_size, use_diarization, do_summarize):
77
  transcription, full_text = transcribe_audio(audio_file, translate, model_size, use_diarization)
78
  summary = summarize_text(full_text) if do_summarize else ""
 
57
  else:
58
  raise
59
 
60
+ @spaces.GPU(duration=600)
61
  def transcribe_audio(audio_file, translate, model_size, use_diarization):
62
  return process_with_fallback(process_audio, audio_file, translate=translate, model_size=model_size, use_diarization=use_diarization)
63
 
64
+ @spaces.GPU(duration=600)
65
  def summarize_text(text):
66
  summarizer = load_summarization_model()
67
  try:
 
72
  summary = "Error occurred during summarization. Please try again."
73
  return summary
74
 
75
+ @spaces.GPU(duration=600)
76
  def process_and_summarize(audio_file, translate, model_size, use_diarization, do_summarize):
77
  transcription, full_text = transcribe_audio(audio_file, translate, model_size, use_diarization)
78
  summary = summarize_text(full_text) if do_summarize else ""