verkaDerkaDerk commited on
Commit
dc7bf5b
·
1 Parent(s): 536a523

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -7,6 +7,8 @@ MODEL_ID = "verkaDerkaDerk/tiki-based-128"
7
  MODEL_ID = "verkaDerkaDerk/tiki-64"
8
  PIPELINE = DDPMPipeline.from_pretrained(MODEL_ID)
9
 
 
 
10
  def tiki(batch_size=1,seed=0):
11
  generator = torch.manual_seed(seed)
12
  return PIPELINE(generator=generator, batch_size=batch_size)["sample"]
@@ -16,6 +18,8 @@ def imagine4():
16
 
17
  def imagine():
18
  return tiki()[0]
 
 
19
 
20
  def fancy():
21
  # try some https://huggingface.co/spaces/stabilityai/stable-diffusion/blob/main/app.py trix
@@ -85,6 +89,8 @@ def fancy():
85
  #block.queue(max_size=40).launch()
86
  block.queue().launch()
87
 
 
 
88
  def plain():
89
  # trix from https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial
90
  title = "Tiki Diffusion Model"
@@ -127,10 +133,15 @@ def plain():
127
  enable_queue=enable_queue
128
  ).launch()
129
 
 
 
130
  def main():
131
  if True:
132
  return fancy()
133
  plain()
134
 
135
 
136
- main()
 
 
 
 
7
  MODEL_ID = "verkaDerkaDerk/tiki-64"
8
  PIPELINE = DDPMPipeline.from_pretrained(MODEL_ID)
9
 
10
+ #############################################################################
11
+
12
  def tiki(batch_size=1,seed=0):
13
  generator = torch.manual_seed(seed)
14
  return PIPELINE(generator=generator, batch_size=batch_size)["sample"]
 
18
 
19
  def imagine():
20
  return tiki()[0]
21
+
22
+ #############################################################################
23
 
24
  def fancy():
25
  # try some https://huggingface.co/spaces/stabilityai/stable-diffusion/blob/main/app.py trix
 
89
  #block.queue(max_size=40).launch()
90
  block.queue().launch()
91
 
92
+ #############################################################################
93
+
94
  def plain():
95
  # trix from https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial
96
  title = "Tiki Diffusion Model"
 
133
  enable_queue=enable_queue
134
  ).launch()
135
 
136
+ #############################################################################
137
+
138
  def main():
139
  if True:
140
  return fancy()
141
  plain()
142
 
143
 
144
+ main()
145
+
146
+ # EOF
147
+ #############################################################################