phenomenon1981 commited on
Commit
ada5e04
·
1 Parent(s): 5731904

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -16,7 +16,7 @@ proc1=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
16
 
17
  def restart_script_periodically():
18
  while True:
19
- time.sleep(600) # 10 minutes
20
  try:
21
  os.execl(sys.executable, sys.executable, *sys.argv)
22
  except:
@@ -53,15 +53,15 @@ def send_it2(inputs, noise_level, proc1=proc1):
53
  output2 = proc1(prompt_with_noise)
54
  return output2
55
 
56
- def send_it3(inputs, noise_level, proc1=proc1):
57
- prompt_with_noise = add_random_noise(inputs, noise_level)
58
- output3 = proc1(prompt_with_noise)
59
- return output3
60
 
61
- def send_it4(inputs, noise_level, proc1=proc1):
62
- prompt_with_noise = add_random_noise(inputs, noise_level)
63
- output4 = proc1(prompt_with_noise)
64
- return output4
65
 
66
 
67
 
@@ -84,9 +84,9 @@ with gr.Blocks() as myface:
84
  with gr.Row():
85
  output1=gr.Image(label="Dreamlike-photoreal-2.0")
86
  output2=gr.Image(label="Dreamlike-photoreal-2.0")
87
- with gr.Row():
88
- output3=gr.Image(label="Dreamlike-photoreal-2.0")
89
- output4=gr.Image(label="Dreamlike-photoreal-2.0")
90
  #with gr.Row():
91
  #output5=gr.Image(label="Dreamlike-photoreal-2.0")
92
  #output6=gr.Image(label="Dreamlike-photoreal-2.0")
@@ -97,8 +97,8 @@ with gr.Blocks() as myface:
97
  see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
98
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
99
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
100
- run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
101
- run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
102
  #run.click(send_it5, inputs=[prompt, noise_level], outputs=[output5])
103
  #run.click(send_it6, inputs=[prompt, noise_level], outputs=[output6])
104
  #run.click(send_it7, inputs=[prompt, noise_level], outputs=[output7])
 
16
 
17
  def restart_script_periodically():
18
  while True:
19
+ time.sleep(1020) # 17 minutes
20
  try:
21
  os.execl(sys.executable, sys.executable, *sys.argv)
22
  except:
 
53
  output2 = proc1(prompt_with_noise)
54
  return output2
55
 
56
+ #def send_it3(inputs, noise_level, proc1=proc1):
57
+ #prompt_with_noise = add_random_noise(inputs, noise_level)
58
+ #output3 = proc1(prompt_with_noise)
59
+ #return output3
60
 
61
+ #def send_it4(inputs, noise_level, proc1=proc1):
62
+ #prompt_with_noise = add_random_noise(inputs, noise_level)
63
+ #output4 = proc1(prompt_with_noise)
64
+ #return output4
65
 
66
 
67
 
 
84
  with gr.Row():
85
  output1=gr.Image(label="Dreamlike-photoreal-2.0")
86
  output2=gr.Image(label="Dreamlike-photoreal-2.0")
87
+ #with gr.Row():
88
+ #output3=gr.Image(label="Dreamlike-photoreal-2.0")
89
+ #output4=gr.Image(label="Dreamlike-photoreal-2.0")
90
  #with gr.Row():
91
  #output5=gr.Image(label="Dreamlike-photoreal-2.0")
92
  #output6=gr.Image(label="Dreamlike-photoreal-2.0")
 
97
  see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt], queue=False)
98
  run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
99
  run.click(send_it2, inputs=[prompt, noise_level], outputs=[output2])
100
+ #run.click(send_it3, inputs=[prompt, noise_level], outputs=[output3])
101
+ #run.click(send_it4, inputs=[prompt, noise_level], outputs=[output4])
102
  #run.click(send_it5, inputs=[prompt, noise_level], outputs=[output5])
103
  #run.click(send_it6, inputs=[prompt, noise_level], outputs=[output6])
104
  #run.click(send_it7, inputs=[prompt, noise_level], outputs=[output7])