christinac commited on
Commit
89c5bf1
·
1 Parent(s): 0fc04c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -45,25 +45,7 @@ def drawImage(text, text_size, prompt, strength, guidance_scale): #(text, text_s
45
 
46
  #blocks = gr.Blocks()
47
 
48
- demo = gr.Interface(
49
- title="this will be very slow since it's on CPU! msg me if you would like to try",
50
- description="turn on acceleration from7-9,google form",
51
- ##theme='huggingface',
52
- css="""
53
- body {font-family: system-ui, Helvetica, Arial, sans-serif}
54
- #""",
55
- fn=drawImage,
56
- inputs=[
57
- gr.Textbox(placeholder="shift + enter for new line",label="what do you want to say?"),
58
- ##"file"
59
- gr.Number(label="text size",value=240),
60
- gr.Textbox(placeholder="eg. imagery, art style, materials, emotions",label="how does your message look and feel?"), #figure out models in series
61
- gr.Slider(label="strength (how much noise will be added to the input image)",minimum=0, maximum=1, step=0.01, value=0.7),
62
- gr.Slider(label="guidance scale (how much the image generation follows the prompt)",value=15, maximum=20),
63
- ],
64
- outputs="image")
65
-
66
- #with blocks (css=".gradio-container {background-color: red}")as demo:
67
  #title="this will be very slow since it's on CPU! msg me if you would like to try",
68
  #description="turn on acceleration from7-9,google form",
69
  ##theme='huggingface',
@@ -79,6 +61,24 @@ demo = gr.Interface(
79
  #gr.Slider(label="strength (how much noise will be added to the input image)",minimum=0, maximum=1, step=0.01, value=0.7),
80
  #gr.Slider(label="guidance scale (how much the image generation follows the prompt)",value=15, maximum=20),
81
  #],
82
- #outputs="image"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  demo.launch()
 
45
 
46
  #blocks = gr.Blocks()
47
 
48
+ #demo = gr.Interface(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  #title="this will be very slow since it's on CPU! msg me if you would like to try",
50
  #description="turn on acceleration from7-9,google form",
51
  ##theme='huggingface',
 
61
  #gr.Slider(label="strength (how much noise will be added to the input image)",minimum=0, maximum=1, step=0.01, value=0.7),
62
  #gr.Slider(label="guidance scale (how much the image generation follows the prompt)",value=15, maximum=20),
63
  #],
64
+ #outputs="image")
65
+
66
+ with blocks (css=".gradio-container {background-color: red}") as demo:
67
+ title="this will be very slow since it's on CPU! msg me if you would like to try",
68
+ description="turn on acceleration from7-9,google form",
69
+ ##theme='huggingface',
70
+ css="""
71
+ body {font-family: system-ui, Helvetica, Arial, sans-serif}
72
+ """,
73
+ fn=drawImage,
74
+ inputs=[
75
+ gr.Textbox(placeholder="shift + enter for new line",label="what do you want to say?"),
76
+ ##"file"
77
+ gr.Number(label="text size",value=240),
78
+ gr.Textbox(placeholder="eg. imagery, art style, materials, emotions",label="how does your message look and feel?"), #figure out models in series
79
+ gr.Slider(label="strength (how much noise will be added to the input image)",minimum=0, maximum=1, step=0.01, value=0.7),
80
+ gr.Slider(label="guidance scale (how much the image generation follows the prompt)",value=15, maximum=20),
81
+ ],
82
+ outputs="image"
83
 
84
  demo.launch()