mrestrepo commited on
Commit
4e6a7fd
·
1 Parent(s): e969611

Notebook login add

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,15 +1,14 @@
 
1
  import gradio as gr
2
  import numpy as np
3
  import random
4
  # import spaces #[uncomment to use ZeroGPU]
5
  from diffusers import AutoPipelineForText2Image
6
  import torch
 
7
 
 
8
 
9
- # from huggingface_hub import notebook_login
10
- # notebook_login()
11
-
12
- from huggingface_hub import snapshot_download
13
  snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
14
 
15
  pipeline = AutoPipelineForText2Image.from_pretrained(
@@ -23,7 +22,7 @@ MAX_IMAGE_SIZE = 1024
23
  # @spaces.GPU #[uncomment to use ZeroGPU]
24
 
25
 
26
- def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps, progress=gr.Progress(track_tqdm=True)):
27
 
28
  if randomize_seed:
29
  seed = random.randint(0, MAX_SEED)
 
1
+ from huggingface_hub import snapshot_download
2
  import gradio as gr
3
  import numpy as np
4
  import random
5
  # import spaces #[uncomment to use ZeroGPU]
6
  from diffusers import AutoPipelineForText2Image
7
  import torch
8
+ from huggingface_hub import notebook_login
9
 
10
+ notebook_login()
11
 
 
 
 
 
12
  snapshot_download(repo_id="Roomie/xavyy", cache_dir='./')
13
 
14
  pipeline = AutoPipelineForText2Image.from_pretrained(
 
22
  # @spaces.GPU #[uncomment to use ZeroGPU]
23
 
24
 
25
+ def infer(prompt, seed, randomize_seed):
26
 
27
  if randomize_seed:
28
  seed = random.randint(0, MAX_SEED)