Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,9 @@ processor = WhisperProcessor.from_pretrained("NbAiLab/nb-whisper-large")
|
|
63 |
# Generation kwargs
|
64 |
generate_kwargs = {
|
65 |
"num_beams": 5,
|
66 |
-
"
|
|
|
|
|
67 |
}
|
68 |
|
69 |
# Initialize pipeline
|
@@ -215,15 +217,11 @@ def save_to_pdf(text, summary):
|
|
215 |
pdf.output(pdf_output_path)
|
216 |
return pdf_output_path
|
217 |
|
218 |
-
def display_image():
|
219 |
-
img_url = "https://huggingface.co/spaces/camparchimedes/transcription_app/blob/main/banner_trans.png"
|
220 |
-
return img_url
|
221 |
-
|
222 |
iface = gr.Blocks()
|
223 |
|
224 |
with iface:
|
225 |
-
gr.Image(
|
226 |
-
gr.Markdown("
|
227 |
|
228 |
with gr.Tabs():
|
229 |
with gr.TabItem("Transcription"):
|
|
|
63 |
# Generation kwargs
|
64 |
generate_kwargs = {
|
65 |
"num_beams": 5,
|
66 |
+
"task": "transcribe",
|
67 |
+
"language": "no",
|
68 |
+
"forced_decoder_ids": None
|
69 |
}
|
70 |
|
71 |
# Initialize pipeline
|
|
|
217 |
pdf.output(pdf_output_path)
|
218 |
return pdf_output_path
|
219 |
|
|
|
|
|
|
|
|
|
220 |
iface = gr.Blocks()
|
221 |
|
222 |
with iface:
|
223 |
+
gr.Image("https://huggingface.co/spaces/camparchimedes/transcription_app/blob/main/banner_trans.png")
|
224 |
+
gr.Markdown("*Switch Work's JoJo-versjon som webapp for transkribering av lydfiler til norsk skrift. Språkmodell: NbAiLab/nb-whisper-large, Ekstra: oppsummering, pdf-download*")
|
225 |
|
226 |
with gr.Tabs():
|
227 |
with gr.TabItem("Transcription"):
|