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() |