verkaDerkaDerk commited on
Commit
a30c8bf
1 Parent(s): 601e777

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -8
app.py CHANGED
@@ -4,16 +4,20 @@ from diffusers import DDPMPipeline, DDIMPipeline, PNDMPipeline
4
 
5
  MODEL_ID = "verkaDerkaDerk/tiki-based-128"
6
  PIPELINE = DDPMPipeline.from_pretrained(MODEL_ID)
7
- gr.Interface.from_pipeline(PIPELINE).launch()
8
 
 
 
 
 
 
9
 
10
- '''
11
  def greet(name):
12
- pipeline = DDPMPipeline.from_pretrained(MODEL_ID)
13
- image = pipeline()["sample"]
14
- return image
15
  return f"Sup, {name}?"
16
 
17
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
18
- iface.launch()
19
- '''
 
 
 
 
 
4
 
5
  MODEL_ID = "verkaDerkaDerk/tiki-based-128"
6
  PIPELINE = DDPMPipeline.from_pretrained(MODEL_ID)
 
7
 
8
+ def idk():
9
+ gr.Interface.from_pipeline(PIPELINE).launch()
10
+
11
+ def imagine(name):
12
+ return PIPELINE()["sample"]
13
 
 
14
  def greet(name):
 
 
 
15
  return f"Sup, {name}?"
16
 
17
+ def main():
18
+ if True:
19
+ gr.Interface(fn=greet, inputs="text", outputs="text").launch()
20
+ else:
21
+ idk()
22
+
23
+ main()