Spaces:
Sleeping
Sleeping
File size: 977 Bytes
e3ef543 ed018e2 43ba0a4 e3ef543 43ba0a4 e3ef543 dc820d1 43ba0a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# from transformers import pipeline
# import gradio as gr
# # Load the pipeline with the cache_dir parameter
# pipe = pipeline(model="tarteel-ai/whisper-base-ar-quran")
# def transcribe(audio):
# text = pipe(audio)["text"]
# return text
# iface = gr.Interface(
# fn=transcribe,
# inputs=gr.Audio(source="upload", type="filepath"),
# outputs="text",
# )
# iface.launch()
# from transformers import pipeline
# model_id = "tarteel-ai/whisper-base-ar-quran" # update with your model id
# pipe = pipeline("automatic-speech-recognition", model=model_id)
# def transcribe(filepath):
# output = pipe(
# filepath,
# max_new_tokens=10000,
# )
# return output["text"]
# import gradio as gr
# iface = gr.Interface(
# fn=transcribe,
# inputs=gr.Audio(source="upload", type="filepath"),
# outputs="text",
# )
# iface.launch()
import gradio as gr
gr.Interface.load("models/tarteel-ai/whisper-base-ar-quran").launch()
|