mswhite commited on
Commit
f062bf5
·
1 Parent(s): 28dca47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -17
app.py CHANGED
@@ -1,30 +1,27 @@
1
-
2
  # Basic Interface
 
3
 
4
  #import gradio as gr
5
-
6
  #demo = gr.load("mswhite/miamivice", src="models")
7
  #demo.launch()
8
 
 
9
  # Detailed Interface
 
10
 
11
  import os
12
  import gradio as gr
13
- #from transformers import pipeline
14
- #from diffusers import StableDiffusionImg2ImgPipeline
15
-
16
  import torch
17
- from diffusers import StableDiffusionPipeline
18
 
19
  pipe = StableDiffusionPipeline.from_pretrained("mswhite/miamivice", torch_dtype=torch.float16, safety_checker=None)
20
  pipe = pipe.to("cuda")
21
 
22
- #prompt = "a photo of an astronaut riding a horse on mars"
23
- #image = pipe(prompt).images[0]
24
- #pipe = pipeline("text-to-image", model="mswhite/miamivice")
25
 
26
  def nagelize(text):
27
- prompt = "p_nagel illustration of " + text
28
  print(prompt)
29
  return pipe(prompt).images[0]
30
 
@@ -46,10 +43,3 @@ with gr.Blocks() as demo:
46
  demo.launch()
47
 
48
 
49
-
50
-
51
-
52
-
53
-
54
-
55
-
 
1
+ # ==============================
2
  # Basic Interface
3
+ # ==============================
4
 
5
  #import gradio as gr
 
6
  #demo = gr.load("mswhite/miamivice", src="models")
7
  #demo.launch()
8
 
9
+ # ==============================
10
  # Detailed Interface
11
+ # ==============================
12
 
13
  import os
14
  import gradio as gr
 
 
 
15
  import torch
16
+ from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
17
 
18
  pipe = StableDiffusionPipeline.from_pretrained("mswhite/miamivice", torch_dtype=torch.float16, safety_checker=None)
19
  pipe = pipe.to("cuda")
20
 
21
+ # Sample Prompt - "bright clean clear illustration side profile of a woman wearing pink lipstick p_nagel"
 
 
22
 
23
  def nagelize(text):
24
+ prompt = "bright clean clear illustration of " + text + " p_nagel"
25
  print(prompt)
26
  return pipe(prompt).images[0]
27
 
 
43
  demo.launch()
44
 
45