Oscar Wang
Update app.py
e1e3a6c verified
raw
history blame
350 Bytes
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("GoalZero/GoalZero-latest", hf_token=hf_token).launch()