Spaces:
Build error
Build error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import random
|
3 |
+
|
4 |
+
import gradio as gr
|
5 |
+
|
6 |
+
#links
|
7 |
+
Article = ""
|
8 |
+
Article = Article + " Gallery UI documentation: https://gradio.app/docs/"
|
9 |
+
Article = Article + " Unsplash free image source requires 5MP or larger images: https://unsplash.com/"
|
10 |
+
Article = Article + " Github should also be a worthy alternative with free repos. "
|
11 |
+
Article = Article + " Raw git content can be accessed by URL like so: https://raw.github.com/AaronCWacker/Yggdrasil/images/"
|
12 |
+
Article = Article + " Originals go here: https://github.com/AaronCWacker/Yggdrasil/tree/main/images"
|
13 |
+
# Aaron_Wacker_health_and_medical_icon_set_on_white_background_bba24b60-9fcf-411b-9c00-dd1ba1e3553c.png
|
14 |
+
|
15 |
+
|
16 |
+
def fake_gan():
|
17 |
+
images = [
|
18 |
+
(random.choice(
|
19 |
+
[
|
20 |
+
"Aaron_Wacker_health_and_medical_iccon_set_on_white_background_0384ab0e-c970-4b30-8ed5-070505799cc2.png",
|
21 |
+
"Aaron_Wacker_health_and_medical_iccon_set_on_white_background_2e8c1e07-ab53-4ad3-92f5-064d978cf7f9.png",
|
22 |
+
"Aaron_Wacker_health_and_medical_iccon_set_on_white_background_e9d86d2e-502c-4e86-951a-b8650d4bb435.png",
|
23 |
+
"Aaron_Wacker_health_and_medical_icon_set_on_white_background_117cea12-a29f-4fde-9382-59cb3954907c.png",
|
24 |
+
"Aaron_Wacker_health_and_medical_icon_set_on_white_background_5560d026-d6fe-4dc2-bef7-46362f261cf1.png",
|
25 |
+
"Aaron_Wacker_health_and_medical_icon_set_on_white_background_5aafc47e-a0f7-452d-944c-405f1fe07c66.png",
|
26 |
+
"Aaron_Wacker_health_and_medical_icon_set_on_white_background_bba24b60-9fcf-411b-9c00-dd1ba1e3553c.png",
|
27 |
+
"Aaron_Wacker_multiple_graph_and_chart_UI_multiple_data_visualiz_3c08106c-51fd-4efe-be1a-7565ae73841e.png",
|
28 |
+
"Aaron_Wacker_multiple_graph_and_chart_UI_multiple_data_visualiz_56084dcc-99ba-4bbd-8192-166e3321b9b8.png",
|
29 |
+
"Aaron_Wacker_multiple_graph_and_chart_UI_multiple_data_visualiz_a4d1e2f4-cf56-4ac2-ab89-ef60c0576672.png",
|
30 |
+
"Aaron_Wacker_multiple_graph_and_chart_UI_multiple_data_visualiz_144e27a1-3f78-43cb-bdec-c4507a9c8a30.png",
|
31 |
+
"Aaron_Wacker_clean_minimalist_GUI_pack_c85a49b0-d3f8-4e65-9f55-8bc507650231.png",
|
32 |
+
]
|
33 |
+
), f"label {i}" if i != 0 else "label" * 50)
|
34 |
+
for i in range(10)
|
35 |
+
]
|
36 |
+
return images
|
37 |
+
|
38 |
+
|
39 |
+
with gr.Blocks() as demo:
|
40 |
+
with gr.Column(variant="panel"):
|
41 |
+
with gr.Row(variant="compact"):
|
42 |
+
text = gr.Textbox(
|
43 |
+
label="Health and Medical Icon Sets",
|
44 |
+
show_label=False,
|
45 |
+
max_lines=1,
|
46 |
+
placeholder="Enter your prompt",
|
47 |
+
).style(
|
48 |
+
container=False,
|
49 |
+
)
|
50 |
+
btn = gr.Button("Generate image").style(full_width=False)
|
51 |
+
|
52 |
+
gallery = gr.Gallery(
|
53 |
+
label="Generated images", show_label=False, elem_id="gallery"
|
54 |
+
).style(grid=[2], height="auto")
|
55 |
+
|
56 |
+
btn.click(fake_gan, None, gallery)
|
57 |
+
|
58 |
+
if __name__ == "__main__":
|
59 |
+
demo.launch()
|