phenomenon1981 commited on
Commit
aadb74c
1 Parent(s): dd56355

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -10
app.py CHANGED
@@ -28,8 +28,9 @@ def send_it1(inputs, noise_level, proc1=proc1):
28
  queue_length_counter = 0
29
  output1 = proc1(prompt_with_noise)
30
  queue_length_counter += 1
31
- time.sleep(2)
32
  return output1
 
33
 
34
  def send_it2(inputs, noise_level, proc1=proc1):
35
  global queue_length_counter
@@ -40,8 +41,9 @@ def send_it2(inputs, noise_level, proc1=proc1):
40
  queue_length_counter = 0
41
  output2 = proc1(prompt_with_noise)
42
  queue_length_counter += 1
43
- time.sleep(2)
44
  return output2
 
45
 
46
  def send_it3(inputs, noise_level, proc1=proc1):
47
  global queue_length_counter
@@ -52,8 +54,9 @@ def send_it3(inputs, noise_level, proc1=proc1):
52
  queue_length_counter = 0
53
  output3 = proc1(prompt_with_noise)
54
  queue_length_counter += 1
55
- time.sleep(2)
56
  return output3
 
57
 
58
  def send_it4(inputs, noise_level, proc1=proc1):
59
  global queue_length_counter
@@ -64,8 +67,9 @@ def send_it4(inputs, noise_level, proc1=proc1):
64
  queue_length_counter = 0
65
  output4 = proc1(prompt_with_noise)
66
  queue_length_counter += 1
67
- time.sleep(2)
68
  return output4
 
69
 
70
  def send_it5(inputs, noise_level, proc5=proc5):
71
  global queue_length_counter
@@ -76,8 +80,9 @@ def send_it5(inputs, noise_level, proc5=proc5):
76
  queue_length_counter = 0
77
  output5 = proc5(prompt_with_noise)
78
  queue_length_counter += 1
79
- time.sleep(2)
80
  return output5
 
81
 
82
  def send_it6(inputs, noise_level, proc5=proc5):
83
  global queue_length_counter
@@ -88,8 +93,9 @@ def send_it6(inputs, noise_level, proc5=proc5):
88
  queue_length_counter = 0
89
  output6 = proc5(prompt_with_noise)
90
  queue_length_counter += 1
91
- time.sleep(2)
92
  return output6
 
93
 
94
  def send_it7(inputs, noise_level, proc5=proc5):
95
  global queue_length_counter
@@ -100,8 +106,9 @@ def send_it7(inputs, noise_level, proc5=proc5):
100
  queue_length_counter = 0
101
  output7 = proc5(prompt_with_noise)
102
  queue_length_counter += 1
103
- time.sleep(2)
104
  return output7
 
105
 
106
  def send_it8(inputs, noise_level, proc5=proc5):
107
  global queue_length_counter
@@ -112,8 +119,9 @@ def send_it8(inputs, noise_level, proc5=proc5):
112
  queue_length_counter = 0
113
  output8 = proc5(prompt_with_noise)
114
  queue_length_counter += 1
115
- time.sleep(2)
116
  return output8
 
117
 
118
 
119
 
@@ -125,8 +133,9 @@ def get_prompts(prompt_text):
125
  queue_length_counter = 0
126
  output = text_gen(prompt_text)
127
  queue_length_counter += 1
128
- time.sleep(2)
129
  return output
 
130
 
131
 
132
  with gr.Blocks() as myface:
@@ -137,7 +146,7 @@ with gr.Blocks() as myface:
137
  with gr.Row():
138
 
139
  prompt=gr.Textbox(label="Enter Prompt")
140
- noise_level=gr.Slider(minimum=0.1, maximum=1, step=0.1, label="Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs.")
141
  run=gr.Button("Generate")
142
 
143
  with gr.Row():
 
28
  queue_length_counter = 0
29
  output1 = proc1(prompt_with_noise)
30
  queue_length_counter += 1
31
+ time.sleep(3)
32
  return output1
33
+ time.sleep(1)
34
 
35
  def send_it2(inputs, noise_level, proc1=proc1):
36
  global queue_length_counter
 
41
  queue_length_counter = 0
42
  output2 = proc1(prompt_with_noise)
43
  queue_length_counter += 1
44
+ time.sleep(3)
45
  return output2
46
+ time.sleep(1)
47
 
48
  def send_it3(inputs, noise_level, proc1=proc1):
49
  global queue_length_counter
 
54
  queue_length_counter = 0
55
  output3 = proc1(prompt_with_noise)
56
  queue_length_counter += 1
57
+ time.sleep(3)
58
  return output3
59
+ time.sleep(1)
60
 
61
  def send_it4(inputs, noise_level, proc1=proc1):
62
  global queue_length_counter
 
67
  queue_length_counter = 0
68
  output4 = proc1(prompt_with_noise)
69
  queue_length_counter += 1
70
+ time.sleep(3)
71
  return output4
72
+ time.sleep(1)
73
 
74
  def send_it5(inputs, noise_level, proc5=proc5):
75
  global queue_length_counter
 
80
  queue_length_counter = 0
81
  output5 = proc5(prompt_with_noise)
82
  queue_length_counter += 1
83
+ time.sleep(3)
84
  return output5
85
+ time.sleep(1)
86
 
87
  def send_it6(inputs, noise_level, proc5=proc5):
88
  global queue_length_counter
 
93
  queue_length_counter = 0
94
  output6 = proc5(prompt_with_noise)
95
  queue_length_counter += 1
96
+ time.sleep(3)
97
  return output6
98
+ time.sleep(1)
99
 
100
  def send_it7(inputs, noise_level, proc5=proc5):
101
  global queue_length_counter
 
106
  queue_length_counter = 0
107
  output7 = proc5(prompt_with_noise)
108
  queue_length_counter += 1
109
+ time.sleep(3)
110
  return output7
111
+ time.sleep(1)
112
 
113
  def send_it8(inputs, noise_level, proc5=proc5):
114
  global queue_length_counter
 
119
  queue_length_counter = 0
120
  output8 = proc5(prompt_with_noise)
121
  queue_length_counter += 1
122
+ time.sleep(3)
123
  return output8
124
+ time.sleep(1)
125
 
126
 
127
 
 
133
  queue_length_counter = 0
134
  output = text_gen(prompt_text)
135
  queue_length_counter += 1
136
+ time.sleep(3)
137
  return output
138
+ time.sleep(1)
139
 
140
 
141
  with gr.Blocks() as myface:
 
146
  with gr.Row():
147
 
148
  prompt=gr.Textbox(label="Enter Prompt")
149
+ noise_level=gr.Slider(minimum=0.1, maximum=30, step=0.1, label="Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs.")
150
  run=gr.Button("Generate")
151
 
152
  with gr.Row():