File size: 478 Bytes
2833649 dfdd9e9 2833649 dfdd9e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import os
import gradio as gr
from huggingface import HfApi
# gr.load("models/username/finetuning-wav2vec-large-swahili-asr-model_v10").launch()
# Retrieve the Hugging Face token from the environment variable
HG_TOKEN = os.getenv("HG")
# Fetch the model details using the Hugging Face API
model_info = HfApi().model_details("Joshua-Abok/finetuning-wav2vec-large-swahili-asr-model_v10", hf_token=HG_TOKEN)
# Load the model
gr.load(model_info).launch() |