sanjeevbora commited on
Commit
d161ad2
·
verified ·
1 Parent(s): e8418f7

updated ap.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -4,6 +4,11 @@ import random
4
  #import spaces #[uncomment to use ZeroGPU]
5
  from diffusers import DiffusionPipeline
6
  import torch
 
 
 
 
 
7
 
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
  model_repo_id = "black-forest-labs/FLUX.1-dev" #Replace to the model you would like to use
 
4
  #import spaces #[uncomment to use ZeroGPU]
5
  from diffusers import DiffusionPipeline
6
  import torch
7
+ import os
8
+ from huggingface_hub import login
9
+
10
+ token = os.getenv("HUGGINGFACE_HUB_TOKEN")
11
+ login(token=token)
12
 
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
  model_repo_id = "black-forest-labs/FLUX.1-dev" #Replace to the model you would like to use