camparchimedes commited on
Commit
2f03bd6
·
verified ·
1 Parent(s): dbca570

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -14,9 +14,10 @@
14
  # limitations under the License.
15
  #---------------------------------------------------------------------------------------------------------------------------------------------
16
 
17
- import spaces
18
  import gradio as gr
19
  from PIL import Image
 
20
  import os
21
  import re
22
  import warnings
@@ -25,7 +26,7 @@ import datetime
25
  import subprocess
26
  from pathlib import Path
27
  from fpdf import FPDF
28
- from pydub import AudioSegment
29
 
30
  from gpuinfo import GPUInfo
31
  import pandas as pd
@@ -49,10 +50,10 @@ HEADER_INFO = """
49
  # WEB APP ✨| Norwegian WHISPER Model
50
  Switch Work [Transkribering av lydfiler til norsk skrift]
51
  """.strip()
52
- LOGO = "https://huggingface.co/spaces/camparchimedes/transcription_app/resolve/main/pic09w9678yhit.png"
53
  SIDEBAR_INFO = f"""
54
  <div align=center>
55
- <img src="{LOGO}" style="width: 100%; height: auto;"/>"""
56
 
57
  warnings.filterwarnings("ignore")
58
 
@@ -79,7 +80,7 @@ pipe = pipeline(
79
  device=device,
80
  )
81
 
82
- def transcribe_audio(audio_file, batch_size=16):
83
  if audio_file.endswith(".m4a"):
84
  audio_file = convert_to_wav(audio_file)
85
 
 
14
  # limitations under the License.
15
  #---------------------------------------------------------------------------------------------------------------------------------------------
16
 
17
+
18
  import gradio as gr
19
  from PIL import Image
20
+ from pydub import AudioSegment
21
  import os
22
  import re
23
  import warnings
 
26
  import subprocess
27
  from pathlib import Path
28
  from fpdf import FPDF
29
+
30
 
31
  from gpuinfo import GPUInfo
32
  import pandas as pd
 
50
  # WEB APP ✨| Norwegian WHISPER Model
51
  Switch Work [Transkribering av lydfiler til norsk skrift]
52
  """.strip()
53
+ LOGO = "https://huggingface.co/spaces/camparchimedes/transcription_app/blob/main/pic09w9678yhit.png"
54
  SIDEBAR_INFO = f"""
55
  <div align=center>
56
+ <img src="{LOGO}" style="width: 99%; height: auto;"/>"""
57
 
58
  warnings.filterwarnings("ignore")
59
 
 
80
  device=device,
81
  )
82
 
83
+ def transcribe_audio(audio_file, batch_size=10):
84
  if audio_file.endswith(".m4a"):
85
  audio_file = convert_to_wav(audio_file)
86