yizhangliu commited on
Commit
9251ce3
1 Parent(s): c63fe82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -223,6 +223,7 @@ def predict(dict, prompt=""):
223
 
224
  return output.images[0], gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
225
 
 
226
 
227
  css = '''
228
  .container {max-width: 1150px;margin: auto;padding-top: 1.5rem}
@@ -263,8 +264,6 @@ css = '''
263
  }
264
  '''
265
 
266
- print(f'liuyz_300_here_')
267
-
268
  image_blocks = gr.Blocks(css=css)
269
  with image_blocks as demo:
270
  gr.HTML(read_content("header.html"))
@@ -292,4 +291,19 @@ with image_blocks as demo:
292
  #btn.click(fn=predict, inputs=[image], outputs=[image]) #, community_icon, loading_icon, share_button])
293
  share_button.click(None, [], [], _js=share_js)
294
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  image_blocks.launch()
 
223
 
224
  return output.images[0], gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
225
 
226
+ print(f'liuyz_400_here_')
227
 
228
  css = '''
229
  .container {max-width: 1150px;margin: auto;padding-top: 1.5rem}
 
264
  }
265
  '''
266
 
 
 
267
  image_blocks = gr.Blocks(css=css)
268
  with image_blocks as demo:
269
  gr.HTML(read_content("header.html"))
 
291
  #btn.click(fn=predict, inputs=[image], outputs=[image]) #, community_icon, loading_icon, share_button])
292
  share_button.click(None, [], [], _js=share_js)
293
 
294
+ gr.HTML(
295
+ """
296
+ <div class="footer">
297
+ <p>Model by <a href="https://huggingface.co/runwayml" style="text-decoration: underline;" target="_blank">RunwayML</a> - Gradio Demo by 🤗 Hugging Face
298
+ </p>
299
+ </div>
300
+ <div class="acknowledgments">
301
+ <p><h4>LICENSE</h4>
302
+ The model is licensed with a <a href="https://huggingface.co/spaces/CompVis/stable-diffusion-license" style="text-decoration: underline;" target="_blank">CreativeML Open RAIL-M</a> license. The authors claim no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in this license. The license forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, spread misinformation and target vulnerable groups. For the full list of restrictions please <a href="https://huggingface.co/spaces/CompVis/stable-diffusion-license" target="_blank" style="text-decoration: underline;" target="_blank">read the license</a></p>
303
+ <p><h4>Biases and content acknowledgment</h4>
304
+ Despite how impressive being able to turn text into image is, beware to the fact that this model may output content that reinforces or exacerbates societal biases, as well as realistic faces, pornography and violence. The model was trained on the <a href="https://laion.ai/blog/laion-5b/" style="text-decoration: underline;" target="_blank">LAION-5B dataset</a>, which scraped non-curated image-text-pairs from the internet (the exception being the removal of illegal content) and is meant for research purposes. You can read more in the <a href="https://huggingface.co/CompVis/stable-diffusion-v1-4" style="text-decoration: underline;" target="_blank">model card</a></p>
305
+ </div>
306
+ """
307
+ )
308
+
309
  image_blocks.launch()