Spaces:
Runtime error
Runtime error
update app.py
Browse files15 unmodified lines1617181920212223242515 unmodified linesif HF_TOKEN is None:raise ValueError("HF_TOKEN environment variable is not set. Please set it before running the script.")# Authenticate with Hugging Faceapi = HfApi()api.set_access_token(HF_TOKEN)# Check for GPU support and configure appropriatelydevice = "cuda" if torch.cuda.is_available() else "cpu"15 unmodified lines1617181920212223242515 unmodified linesif HF_TOKEN is None:raise ValueError("HF_TOKEN environment variable is not set. Please set it before running the script.")hf_api = HfApi(token= HF_TOKEN, # Token is not persisted on the machine.)# Check for GPU support and configure appropriatelydevice = "cuda" if torch.cuda.is_available() else "cpu"
app.py+3-3