Spaces:
Running
Running
File size: 603 Bytes
767a69a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
from transformers import pipeline
# Load the Whisper model
pipe = pipeline("automatic-speech-recognition", model="tarteel-ai/whisper-base-ar-quran")
# Define inference function
def transcribe(audio):
result = pipe(audio)["text"]
return result
# Gradio interface
interface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(type="filepath", label="Upload Audio"),
outputs=gr.Textbox(label="Transcription"),
title="Arabic Quran Audio Transcriber",
description="Upload an audio file to transcribe it using Whisper (Quran Arabic model)."
)
interface.launch()
|