Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import argparse
|
| 3 |
from pathlib import Path
|
|
@@ -148,7 +150,7 @@ except Exception as e:
|
|
| 148 |
# This exception will be caught during the transcription step below.
|
| 149 |
|
| 150 |
|
| 151 |
-
|
| 152 |
def transcribe_wrapper(audio_file_path):
|
| 153 |
"""
|
| 154 |
Wraps the core transcription logic for Gradio.
|
|
@@ -196,7 +198,7 @@ def transcribe_wrapper(audio_file_path):
|
|
| 196 |
# Gradio page
|
| 197 |
title = "✨ GLM-ASR-Nano-2512 Transcription Demo"
|
| 198 |
description = (
|
| 199 |
-
"This demo uses the sota new GLM-ASR Nano model to transcribe audio files with great accuracy. Upload an audio file (or record one) to transcribe it into text
|
| 200 |
)
|
| 201 |
|
| 202 |
# Define the Gradio Interface components
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
+
|
| 3 |
import gradio as gr
|
| 4 |
import argparse
|
| 5 |
from pathlib import Path
|
|
|
|
| 150 |
# This exception will be caught during the transcription step below.
|
| 151 |
|
| 152 |
|
| 153 |
+
@spaces.GPU(duration=60)
|
| 154 |
def transcribe_wrapper(audio_file_path):
|
| 155 |
"""
|
| 156 |
Wraps the core transcription logic for Gradio.
|
|
|
|
| 198 |
# Gradio page
|
| 199 |
title = "✨ GLM-ASR-Nano-2512 Transcription Demo"
|
| 200 |
description = (
|
| 201 |
+
"This demo uses the sota new GLM-ASR Nano model to transcribe audio files with great accuracy! The architecture is simple and efficient, composed of a whisper encoder and an llm. Upload an audio file (or record one) to transcribe it into text using the model."
|
| 202 |
)
|
| 203 |
|
| 204 |
# Define the Gradio Interface components
|