unijoh commited on
Commit
933c61b
verified
1 Parent(s): 06b50d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -29,13 +29,10 @@ def main():
29
  except Exception as e:
30
  return f"An error occurred: {e}"
31
 
32
- def transcribe_function(audio, state, uploaded_audio, m3u8_url):
33
  if m3u8_url:
34
  audio = extract_audio_from_m3u8(m3u8_url)
35
 
36
- if uploaded_audio is not None:
37
- audio = uploaded_audio
38
-
39
  if not audio:
40
  # Return a meaningful message; no audio found
41
  return state, "Einki lj贸冒 er til talukenning."
@@ -78,7 +75,7 @@ def main():
78
 
79
  transcribe_button.click(
80
  transcribe_function,
81
- [microphone, state_var, uploaded_audio, m3u8_url],
82
  [state_var, transcription_var]
83
  )
84
 
 
29
  except Exception as e:
30
  return f"An error occurred: {e}"
31
 
32
+ def transcribe_function(audio, state, m3u8_url):
33
  if m3u8_url:
34
  audio = extract_audio_from_m3u8(m3u8_url)
35
 
 
 
 
36
  if not audio:
37
  # Return a meaningful message; no audio found
38
  return state, "Einki lj贸冒 er til talukenning."
 
75
 
76
  transcribe_button.click(
77
  transcribe_function,
78
+ [microphone, state_var, m3u8_url], # Removed uploaded_audio
79
  [state_var, transcription_var]
80
  )
81