File size: 353 Bytes
bb5b784
36e5180
 
bb5b784
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import os
import gradio as gr

# Load the Hugging Face access token from environment variables
hf_token = os.getenv("HUGGING_FACE_TOKEN")

if hf_token is None:
    raise ValueError("Hugging Face access token not found in environment variables.")

# Load the model using the access token
gr.load("models/GoalZero/v1-endpoint", hf_token=hf_token).launch()