ovi054 commited on
Commit
d00b65a
·
verified ·
1 Parent(s): dad50d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -19
app.py CHANGED
@@ -21,19 +21,6 @@ MAX_IMAGE_SIZE = 2048
21
 
22
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
23
 
24
- article_text = """
25
- <div style="text-align: center;">
26
- <p>Enjoying the tool? Buy me a coffee and get exclusive prompt guides!</p>
27
- <p><i>Instantly unlock helpful tips for creating better prompts!</i></p>
28
- <div style="display: flex; justify-content: center;">
29
- <a href="https://piczify.lemonsqueezy.com/buy/0f5206fa-68e8-42f6-9ca8-4f80c587c83e">
30
- <img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png"
31
- alt="Buy Me a Coffee"
32
- style="height: 40px; width: auto; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); border-radius: 10px;">
33
- </a>
34
- </div>
35
- </div>
36
- """
37
 
38
  @spaces.GPU()
39
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, lora_id=None, lora_scale=0.95, progress=gr.Progress(track_tqdm=True)):
@@ -149,12 +136,12 @@ with gr.Blocks(css=css) as app:
149
  examples = examples,
150
  inputs = [text_prompt],
151
  )
152
- gr.on(
153
- triggers=[text_button.click, text_prompt.submit],
154
- fn = infer,
155
- inputs=[text_prompt, seed, randomize_seed, width, height, cfg, steps, custom_lora, lora_scale],
156
- outputs=[image_output,seed_output, seed]
157
- )
158
 
159
  # text_button.click(query, inputs=[custom_lora, text_prompt, steps, cfg, randomize_seed, seed, width, height], outputs=[image_output,seed_output, seed])
160
  # text_button.click(infer, inputs=[text_prompt, seed, randomize_seed, width, height, cfg, steps, custom_lora, lora_scale], outputs=[image_output,seed_output, seed])
 
21
 
22
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  @spaces.GPU()
26
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, lora_id=None, lora_scale=0.95, progress=gr.Progress(track_tqdm=True)):
 
136
  examples = examples,
137
  inputs = [text_prompt],
138
  )
139
+ gr.on(
140
+ triggers=[text_button.click, text_prompt.submit],
141
+ fn = infer,
142
+ inputs=[text_prompt, seed, randomize_seed, width, height, cfg, steps, custom_lora, lora_scale],
143
+ outputs=[image_output,seed_output, seed]
144
+ )
145
 
146
  # text_button.click(query, inputs=[custom_lora, text_prompt, steps, cfg, randomize_seed, seed, width, height], outputs=[image_output,seed_output, seed])
147
  # text_button.click(infer, inputs=[text_prompt, seed, randomize_seed, width, height, cfg, steps, custom_lora, lora_scale], outputs=[image_output,seed_output, seed])