dreamdrop-art commited on
Commit
efe2f1f
1 Parent(s): ef3889f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -26,7 +26,7 @@ def hf_inference(prompt, negative, model, steps, sampler, guidance, width, heigh
26
  images=[]
27
  time.sleep(1)
28
  progress(0.05)
29
- progress(025, desc="Generaing")
30
  image_bytes = query(payload={
31
  "inputs": f"{prompt}",
32
  "parameters": {
@@ -203,7 +203,7 @@ for model_name in model_list:
203
  def txt2img(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed, progress=gr.Progress()):
204
  progress(0, desc="Starting")
205
  time.sleep(2.5)
206
- progress(25, desc="Generating")
207
  result = prodia_client.generate({
208
  "prompt": prompt,
209
  "negative_prompt": negative_prompt,
@@ -215,18 +215,18 @@ def txt2img(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, he
215
  "height": height,
216
  "seed": seed
217
  })
218
- progress(75, desc="Opening image")
219
  job = prodia_client.wait(result)
220
- progress(99, desc="Sending image")
221
  return job["imageUrl"]
222
 
223
 
224
  def img2img(input_image, denoising, prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed, progress=gr.Progress()):
225
  progress(0, desc="Starting")
226
  time.sleep(1.5)
227
- progress(10, desc="Uploading input image")
228
  time.sleep(1.5)
229
- progress(25, desc="Generating")
230
  result = prodia_client.transform({
231
  "imageData": image_to_base64(input_image),
232
  "denoising_strength": denoising,
@@ -240,10 +240,10 @@ def img2img(input_image, denoising, prompt, negative_prompt, model, steps, sampl
240
  "height": height,
241
  "seed": seed
242
  })
243
- progress(75, desc="Opening image")
244
 
245
  job = prodia_client.wait(result)
246
- progress(99, desc="Sending image")
247
  return job["imageUrl"]
248
 
249
 
 
26
  images=[]
27
  time.sleep(1)
28
  progress(0.05)
29
+ progress(0.25, desc="Generaing")
30
  image_bytes = query(payload={
31
  "inputs": f"{prompt}",
32
  "parameters": {
 
203
  def txt2img(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed, progress=gr.Progress()):
204
  progress(0, desc="Starting")
205
  time.sleep(2.5)
206
+ progress(0.25, desc="Generating")
207
  result = prodia_client.generate({
208
  "prompt": prompt,
209
  "negative_prompt": negative_prompt,
 
215
  "height": height,
216
  "seed": seed
217
  })
218
+ progress(0.75, desc="Opening image")
219
  job = prodia_client.wait(result)
220
+ progress(0.99, desc="Sending image")
221
  return job["imageUrl"]
222
 
223
 
224
  def img2img(input_image, denoising, prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed, progress=gr.Progress()):
225
  progress(0, desc="Starting")
226
  time.sleep(1.5)
227
+ progress(0.10, desc="Uploading input image")
228
  time.sleep(1.5)
229
+ progress(0.25, desc="Generating")
230
  result = prodia_client.transform({
231
  "imageData": image_to_base64(input_image),
232
  "denoising_strength": denoising,
 
240
  "height": height,
241
  "seed": seed
242
  })
243
+ progress(0.75, desc="Opening image")
244
 
245
  job = prodia_client.wait(result)
246
+ progress(0.99, desc="Sending image")
247
  return job["imageUrl"]
248
 
249