Spaces:
Runtime error
Runtime error
Commit
Β·
f7020e2
1
Parent(s):
6f8b03b
Update app.py
Browse filesCleaned up extraneous elements and added explanation text and html
app.py
CHANGED
@@ -363,26 +363,36 @@ with gr.Blocks(css=css) as demo:
|
|
363 |
<rect x="23" y="115" width="23" height="23" fill="#AEAEAE"></rect>
|
364 |
<rect x="23" y="69" width="23" height="23" fill="black"></rect>
|
365 |
</svg>
|
366 |
-
<h1
|
367 |
-
|
368 |
</h1>
|
369 |
</div>
|
370 |
-
<p
|
371 |
-
|
372 |
-
To train your own concepts and contribute to the library <a style="text-decoration: underline" href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_textual_inversion_training.ipynb">check out this notebook</a>.
|
373 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
</div>
|
375 |
''')
|
376 |
with gr.Row():
|
377 |
-
with gr.Column():
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
with gr.Column():
|
387 |
with gr.Box():
|
388 |
with gr.Row(elem_id="prompt_area").style(mobile_collapse=False, equal_height=True):
|
@@ -393,16 +403,16 @@ with gr.Blocks(css=css) as demo:
|
|
393 |
rounded=(True, False, False, True),
|
394 |
container=False,
|
395 |
)
|
396 |
-
btn = gr.Button("
|
397 |
margin=False,
|
398 |
rounded=(False, True, True, False),
|
399 |
)
|
400 |
with gr.Row().style():
|
401 |
infer_outputs = gr.Gallery(show_label=False, elem_id="generated-gallery").style(grid=[2], height="512px")
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
with gr.Group(elem_id="share-btn-container"):
|
407 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
408 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
|
|
363 |
<rect x="23" y="115" width="23" height="23" fill="#AEAEAE"></rect>
|
364 |
<rect x="23" y="69" width="23" height="23" fill="black"></rect>
|
365 |
</svg>
|
366 |
+
<h1 _style="font-weight: 900; margin-bottom: 7px;">
|
367 |
+
π§βπ Astronaut Horse Concept Loader
|
368 |
</h1>
|
369 |
</div>
|
370 |
+
<p _style="margin-bottom: 10px; font-size: 94%">
|
371 |
+
Run your own text prompts into fine-tuned artist concepts, see the example below. Currently only loading two artist concepts while testing. Soon will automatically be able to add all concepts from astronaut horse artist collaborations.
|
|
|
372 |
</p>
|
373 |
+
<a href="http://www.astronaut.horse">http://www.astronaut.horse</a>
|
374 |
+
<h2>Prompt Examples Using Artist Token:</h2>
|
375 |
+
<ul>
|
376 |
+
<li>"a photograph of pink crystals in the style of <artist>"</li>
|
377 |
+
<li>"a painting of a horse in the style of <artist>"</li>
|
378 |
+
</ul>
|
379 |
+
<h2>Currently-Usable Concept Tokens</h2>
|
380 |
+
<ul>
|
381 |
+
<li><artist></li>
|
382 |
+
<li><ivan-stripes></li>
|
383 |
+
</ul>
|
384 |
</div>
|
385 |
''')
|
386 |
with gr.Row():
|
387 |
+
# with gr.Column():
|
388 |
+
# gr.Markdown(f"### Navigate the top 100 Textual-Inversion community trained concepts. Use 600+ from [The Library](https://huggingface.co/sd-concepts-library)")
|
389 |
+
# with gr.Row():
|
390 |
+
# image_blocks = []
|
391 |
+
# #for i, model in enumerate(models):
|
392 |
+
# with gr.Box().style(border=None):
|
393 |
+
# gr.HTML(assembleHTML(models))
|
394 |
+
# #title_block(model["token"], model["id"])
|
395 |
+
# #image_blocks.append(image_block(model["images"], model["concept_type"]))
|
396 |
with gr.Column():
|
397 |
with gr.Box():
|
398 |
with gr.Row(elem_id="prompt_area").style(mobile_collapse=False, equal_height=True):
|
|
|
403 |
rounded=(True, False, False, True),
|
404 |
container=False,
|
405 |
)
|
406 |
+
btn = gr.Button("generate image",elem_id="run_btn").style(
|
407 |
margin=False,
|
408 |
rounded=(False, True, True, False),
|
409 |
)
|
410 |
with gr.Row().style():
|
411 |
infer_outputs = gr.Gallery(show_label=False, elem_id="generated-gallery").style(grid=[2], height="512px")
|
412 |
+
# with gr.Row():
|
413 |
+
# gr.HTML("<p style=\"font-size: 95%;margin-top: .75em\">Prompting may not work as you are used to. <code>objects</code> may need the concept added at the end, <code>styles</code> may work better at the beginning. You can navigate on <a href='https://lexica.art'>lexica.art</a> to get inspired on prompts</p>")
|
414 |
+
# with gr.Row():
|
415 |
+
# gr.Examples(examples=examples, fn=infer_examples, inputs=[text], outputs=infer_outputs, cache_examples=True)
|
416 |
with gr.Group(elem_id="share-btn-container"):
|
417 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
418 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|