yizhangliu commited on
Commit
81e1615
·
1 Parent(s): bdf42ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -20
app.py CHANGED
@@ -93,7 +93,7 @@ with image_blocks as demo:
93
  with gr.Column():
94
  image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil", label="Upload").style(height=400)
95
  with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
96
- prompt = gr.Textbox(placeholder = 'Your prompt (what you want in place of what is erased)', show_label=False, elem_id="input-text")
97
  btn = gr.Button("Inpaint!").style(
98
  margin=False,
99
  rounded=(False, True, True, False),
@@ -107,24 +107,8 @@ with image_blocks as demo:
107
  share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
108
 
109
 
110
- btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
111
- share_button.click(None, [], [], _js=share_js)
112
-
113
-
114
-
115
- gr.HTML(
116
- """
117
- <div class="footer">
118
- <p>Model by <a href="https://huggingface.co/runwayml" style="text-decoration: underline;" target="_blank">RunwayML</a> - Gradio Demo by 🤗 Hugging Face
119
- </p>
120
- </div>
121
- <div class="acknowledgments">
122
- <p><h4>LICENSE</h4>
123
- 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>
124
- <p><h4>Biases and content acknowledgment</h4>
125
- 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>
126
- </div>
127
- """
128
- )
129
 
130
  image_blocks.launch()
 
93
  with gr.Column():
94
  image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil", label="Upload").style(height=400)
95
  with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
96
+ # prompt = gr.Textbox(placeholder = 'Your prompt (what you want in place of what is erased)', show_label=False, elem_id="input-text")
97
  btn = gr.Button("Inpaint!").style(
98
  margin=False,
99
  rounded=(False, True, True, False),
 
107
  share_button = gr.Button("Share to community", elem_id="share-btn", visible=False)
108
 
109
 
110
+ # btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
111
+ btn.click(fn=predict, inputs=[image], outputs=[image_out]) #, community_icon, loading_icon, share_button])
112
+ # share_button.click(None, [], [], _js=share_js)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
  image_blocks.launch()