AchyuthGamer commited on
Commit
4c8cb6e
·
1 Parent(s): 1229fae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -37
app.py CHANGED
@@ -15,7 +15,7 @@ def get_prompts(prompt_text):
15
  return text_gen(prompt_text + " realistic, 8k, cyberpunk, highly detailed, ultra super realism, realism, high graphics")
16
  else:
17
  return text_gen("")
18
- proc1=gr.Interface.load("models/Yntec/photoMovieX")
19
 
20
  def restart_script_periodically():
21
  while True:
@@ -75,14 +75,6 @@ def send_it2(inputs, noise_level, proc1=proc1):
75
  output2 = proc1(prompt_with_noise)
76
  return output2
77
 
78
- def send_itX(inputs, noise_level, proc1=proc1):
79
- prompt_with_noise = add_random_noise(inputs, noise_level)
80
- while queue.qsize() >= queue_threshold:
81
- time.sleep(2)
82
- queue.put(prompt_with_noise)
83
- outputX = proc1(prompt_with_noise)
84
- return outputX
85
-
86
  def send_it3(inputs, noise_level, proc1=proc1):
87
  prompt_with_noise = add_random_noise(inputs, noise_level)
88
  while queue.qsize() >= queue_threshold:
@@ -99,23 +91,6 @@ def send_it4(inputs, noise_level, proc1=proc1):
99
  output4 = proc1(prompt_with_noise)
100
  return output4
101
 
102
- def send_it5(inputs, noise_level, proc1=proc1):
103
- prompt_with_noise = add_random_noise(inputs, noise_level)
104
- while queue.qsize() >= queue_threshold:
105
- time.sleep(2)
106
- queue.put(prompt_with_noise)
107
- output5 = proc1(prompt_with_noise)
108
- return output5
109
-
110
- #def send_it7(inputs, noise_level, proc1=proc1):
111
- #prompt_with_noise = add_random_noise(inputs, noise_level)
112
- #while queue.qsize() >= queue_threshold:
113
- # time.sleep(2)
114
- #queue.put(prompt_with_noise)
115
- #output5 = proc1(prompt_with_noise)
116
- #return output0
117
-
118
-
119
  with gr.Blocks(css='style.css') as demo:
120
  gr.HTML(
121
  """
@@ -190,22 +165,11 @@ with gr.Blocks(css='style.css') as demo:
190
  with gr.Row():
191
  output3=gr.Image(label="ImMagician", show_label=False, min_width=640, object_fit="contain", height="auto")
192
  output4=gr.Image(label="ImMagician", show_label=False, min_width=640, object_fit="contain", height="auto")
193
- with gr.Row():
194
- with gr.Row():
195
- output5=gr.Image(label="ImMagician", show_label=False, min_width=640, object_fit="contain", height="auto")
196
- outputX=gr.Image(label="ImMagician", show_label=False, min_width=640, object_fit="contain", height="auto")
197
- #with gr.Row():
198
- #with gr.Row():
199
- #output0=gr.Image(label="PhotoMovieX",show_label=False,min_width=640)
200
  see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
201
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
202
- #run.click(send_it7, inputs=[prompt, noise_level], outputs=[output0])
203
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
204
  run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
205
  run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
206
- run.click(send_it5, inputs=[prompt, noise_level], outputs=[output5])
207
- run.click(send_itX, inputs=[prompt, noise_level], outputs=[outputX])
208
-
209
 
210
  with gr.Row():
211
  gr.HTML(
 
15
  return text_gen(prompt_text + " realistic, 8k, cyberpunk, highly detailed, ultra super realism, realism, high graphics")
16
  else:
17
  return text_gen("")
18
+ proc1=gr.Interface.load("models/AchyuthGamer/ImMagician")
19
 
20
  def restart_script_periodically():
21
  while True:
 
75
  output2 = proc1(prompt_with_noise)
76
  return output2
77
 
 
 
 
 
 
 
 
 
78
  def send_it3(inputs, noise_level, proc1=proc1):
79
  prompt_with_noise = add_random_noise(inputs, noise_level)
80
  while queue.qsize() >= queue_threshold:
 
91
  output4 = proc1(prompt_with_noise)
92
  return output4
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  with gr.Blocks(css='style.css') as demo:
95
  gr.HTML(
96
  """
 
165
  with gr.Row():
166
  output3=gr.Image(label="ImMagician", show_label=False, min_width=640, object_fit="contain", height="auto")
167
  output4=gr.Image(label="ImMagician", show_label=False, min_width=640, object_fit="contain", height="auto")
 
 
 
 
 
 
 
168
  see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
169
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
 
170
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
171
  run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
172
  run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
 
 
 
173
 
174
  with gr.Row():
175
  gr.HTML(