phenomenon1981 commited on
Commit
e7b7a20
1 Parent(s): 9bcda35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -20,49 +20,49 @@ def add_random_noise(prompt, noise_level=0.1):
20
  def send_it1(inputs, noise_level, proc1=proc1):
21
  prompt_with_noise = add_random_noise(inputs, noise_level)
22
  output1=proc1(prompt_with_noise)
23
- time.sleep(5)
24
  return output1
25
 
26
  def send_it2(inputs, noise_level, proc1=proc1):
27
  prompt_with_noise = add_random_noise(inputs, noise_level)
28
  output2 = proc1(prompt_with_noise)
29
- time.sleep(5)
30
  return output2
31
 
32
  def send_it3(inputs, noise_level, proc1=proc1):
33
  prompt_with_noise = add_random_noise(inputs, noise_level)
34
  output3 = proc1(prompt_with_noise)
35
- time.sleep(5)
36
  return output3
37
 
38
  def send_it4(inputs, noise_level, proc1=proc1):
39
  prompt_with_noise = add_random_noise(inputs, noise_level)
40
  output4 = proc1(prompt_with_noise)
41
- time.sleep(5)
42
  return output4
43
 
44
  def send_it5(inputs, noise_level, proc5=proc5):
45
  prompt_with_noise = add_random_noise(inputs, noise_level)
46
  output5 = proc5(prompt_with_noise)
47
- time.sleep(5)
48
  return output5
49
 
50
  def send_it6(inputs, noise_level, proc5=proc5):
51
  prompt_with_noise = add_random_noise(inputs, noise_level)
52
  output6 = proc5(prompt_with_noise)
53
- time.sleep(5)
54
  return output6
55
 
56
  def send_it7(inputs, noise_level, proc5=proc5):
57
  prompt_with_noise = add_random_noise(inputs, noise_level)
58
  output7 = proc5(prompt_with_noise)
59
- time.sleep(5)
60
  return output7
61
 
62
  def send_it8(inputs, noise_level, proc5=proc5):
63
  prompt_with_noise = add_random_noise(inputs, noise_level)
64
  output8 = proc5(prompt_with_noise)
65
- time.sleep(5)
66
  return output8
67
 
68
 
@@ -78,21 +78,21 @@ with gr.Blocks() as myface:
78
 
79
  prompt=gr.Textbox(label="Enter Prompt")
80
  noise_level=gr.Slider(minimum=0.1, maximum=1, step=0.1, label="Noise Level: Adjust noise level to explore different outputs. More noise, more variation. The noise level controls the level of randomness or variations added to the prompt before it is sent to the model. A higher noise level would introduce more variations to the prompt, while a lower noise level would introduce fewer variations.")
81
- run=gr.Button("Generate")
82
 
83
 
84
  with gr.Row():
85
- output1=gr.Image(label="DreamlikeArt PhotoReal 1")
86
- output2=gr.Image(label="DreamlikeArt PhotoReal 2")
87
  with gr.Row():
88
- output3=gr.Image(label="DreamlikeArt PhotoReal 3")
89
- output4=gr.Image(label="DreamlikeArt PhotoReal 4")
90
  with gr.Row():
91
- output5=gr.Image(label="DreamlikeArt Diffusion 1")
92
- output6=gr.Image(label="DreamlikeArt Diffusion 2")
93
  with gr.Row():
94
- output7=gr.Image(label="DreamlikeArt Diffusion 3")
95
- output8=gr.Image(label="DreamlikeArt Diffusion 4")
96
 
97
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
98
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
 
20
  def send_it1(inputs, noise_level, proc1=proc1):
21
  prompt_with_noise = add_random_noise(inputs, noise_level)
22
  output1=proc1(prompt_with_noise)
23
+ time.sleep(1)
24
  return output1
25
 
26
  def send_it2(inputs, noise_level, proc1=proc1):
27
  prompt_with_noise = add_random_noise(inputs, noise_level)
28
  output2 = proc1(prompt_with_noise)
29
+ time.sleep(1)
30
  return output2
31
 
32
  def send_it3(inputs, noise_level, proc1=proc1):
33
  prompt_with_noise = add_random_noise(inputs, noise_level)
34
  output3 = proc1(prompt_with_noise)
35
+ time.sleep(1)
36
  return output3
37
 
38
  def send_it4(inputs, noise_level, proc1=proc1):
39
  prompt_with_noise = add_random_noise(inputs, noise_level)
40
  output4 = proc1(prompt_with_noise)
41
+ time.sleep(1)
42
  return output4
43
 
44
  def send_it5(inputs, noise_level, proc5=proc5):
45
  prompt_with_noise = add_random_noise(inputs, noise_level)
46
  output5 = proc5(prompt_with_noise)
47
+ time.sleep(1)
48
  return output5
49
 
50
  def send_it6(inputs, noise_level, proc5=proc5):
51
  prompt_with_noise = add_random_noise(inputs, noise_level)
52
  output6 = proc5(prompt_with_noise)
53
+ time.sleep(1)
54
  return output6
55
 
56
  def send_it7(inputs, noise_level, proc5=proc5):
57
  prompt_with_noise = add_random_noise(inputs, noise_level)
58
  output7 = proc5(prompt_with_noise)
59
+ time.sleep(1)
60
  return output7
61
 
62
  def send_it8(inputs, noise_level, proc5=proc5):
63
  prompt_with_noise = add_random_noise(inputs, noise_level)
64
  output8 = proc5(prompt_with_noise)
65
+ time.sleep(1)
66
  return output8
67
 
68
 
 
78
 
79
  prompt=gr.Textbox(label="Enter Prompt")
80
  noise_level=gr.Slider(minimum=0.1, maximum=1, step=0.1, label="Noise Level: Adjust noise level to explore different outputs. More noise, more variation. The noise level controls the level of randomness or variations added to the prompt before it is sent to the model. A higher noise level would introduce more variations to the prompt, while a lower noise level would introduce fewer variations.")
81
+ run=gr.Button("Generate", blocking=True)
82
 
83
 
84
  with gr.Row():
85
+ output1=gr.Image(label="DreamlikeArt PhotoReal 1", blocking=True)
86
+ output2=gr.Image(label="DreamlikeArt PhotoReal 2", blocking=True)
87
  with gr.Row():
88
+ output3=gr.Image(label="DreamlikeArt PhotoReal 3", blocking=True)
89
+ output4=gr.Image(label="DreamlikeArt PhotoReal 4", blocking=True)
90
  with gr.Row():
91
+ output5=gr.Image(label="DreamlikeArt Diffusion 1", blocking=True)
92
+ output6=gr.Image(label="DreamlikeArt Diffusion 2", blocking=True)
93
  with gr.Row():
94
+ output7=gr.Image(label="DreamlikeArt Diffusion 3", blocking=True)
95
+ output8=gr.Image(label="DreamlikeArt Diffusion 4", blocking=True)
96
 
97
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
98
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])