nsfwalex commited on
Commit
324e70f
1 Parent(s): 5d91074

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -74,6 +74,7 @@ body {
74
  background-color: rgb(3, 7, 18) !important;
75
  border: none !important;
76
  }
 
77
  '''
78
  js = '''
79
  <script src="https://huggingface.co/spaces/nsfwalex/sd_card/resolve/main/prompt.js"></script>
@@ -167,7 +168,9 @@ def generate(prompt, progress=gr.Progress(track_tqdm=True)):
167
  print(image_paths)
168
  return image_paths
169
 
170
-
 
 
171
  with gr.Blocks(css=css,head=js,fill_height=True) as demo:
172
  with gr.Row(equal_height=False):
173
  with gr.Group():
@@ -193,4 +196,4 @@ with gr.Blocks(css=css,head=js,fill_height=True) as demo:
193
  result.change(fn=lambda x:x, inputs=[prompt,result], outputs=[], js=f'''(p,img)=>window.uploadImage(p, img,"process_started","demo_hf_{cfg.get("name")}_card", "finish")''')
194
 
195
  if __name__ == "__main__":
196
- demo.queue(max_size=200).launch()
 
74
  background-color: rgb(3, 7, 18) !important;
75
  border: none !important;
76
  }
77
+ footer {display: none !important;}
78
  '''
79
  js = '''
80
  <script src="https://huggingface.co/spaces/nsfwalex/sd_card/resolve/main/prompt.js"></script>
 
168
  print(image_paths)
169
  return image_paths
170
 
171
+
172
+ default_image = cfg["cover_path"] if cfg.get("cover_path", None) and os.path.exists(cfg.get("cover_path", None)) else None
173
+
174
  with gr.Blocks(css=css,head=js,fill_height=True) as demo:
175
  with gr.Row(equal_height=False):
176
  with gr.Group():
 
196
  result.change(fn=lambda x:x, inputs=[prompt,result], outputs=[], js=f'''(p,img)=>window.uploadImage(p, img,"process_started","demo_hf_{cfg.get("name")}_card", "finish")''')
197
 
198
  if __name__ == "__main__":
199
+ demo.queue(max_size=200).launch(show_api=False)