seagullOk commited on
Commit
b74b3d4
·
verified ·
1 Parent(s): 61f4e9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -75,7 +75,7 @@ def transcribe_long_audio_with_timestamps(audio_path, segment_length_minutes=5):
75
  return f"❌ 出现错误:{str(e)}", None
76
 
77
 
78
- interface = gr.Interface(
79
  fn=transcribe_long_audio_with_timestamps,
80
  inputs=gr.Audio(type="filepath", label="📤 上传音频(自动分段,含时间戳)"),
81
  outputs=[
@@ -86,5 +86,3 @@ interface = gr.Interface(
86
  description="上传音频,自动分段转录并生成带时间戳的 SRT 字幕文件,时间戳与音频整体时长对应。"
87
  )
88
 
89
- # Spaces 里必须返回 interface,不能用 interface.launch()
90
- app = interface
 
75
  return f"❌ 出现错误:{str(e)}", None
76
 
77
 
78
+ app= gr.Interface(
79
  fn=transcribe_long_audio_with_timestamps,
80
  inputs=gr.Audio(type="filepath", label="📤 上传音频(自动分段,含时间戳)"),
81
  outputs=[
 
86
  description="上传音频,自动分段转录并生成带时间戳的 SRT 字幕文件,时间戳与音频整体时长对应。"
87
  )
88