Spaces:
Build error
Build error
Emiir
commited on
Commit
·
f8c8f5b
1
Parent(s):
3e66a96
Update app.py
Browse files
app.py
CHANGED
@@ -11,14 +11,6 @@ import emoji
|
|
11 |
|
12 |
text_gen = gr.Interface.load("spaces/phenomenon1981/MagicPrompt-Stable-Diffusion")
|
13 |
|
14 |
-
gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
15 |
-
RayicDegeri.com - Araba Resmi Oluşturucu Yapay Zeka Sistemi
|
16 |
-
</h1>
|
17 |
-
<h3 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
18 |
-
Lütfen, Marka: ...., Seri: ..., Model: ...., Yıl: .... şeklinde giriniz.
|
19 |
-
Örneğin: Marka: Renault, Seri: Symbol, Model: 1.5 dCi Authentique, Yıl: 2012
|
20 |
-
</h3>""")
|
21 |
-
|
22 |
def get_prompts(prompt_text):
|
23 |
if prompt_text:
|
24 |
return text_gen("dreamlikeart, " + prompt_text)
|
@@ -71,16 +63,52 @@ def send_it1(inputs, noise_level, proc1=proc1):
|
|
71 |
return output1
|
72 |
|
73 |
with gr.Blocks(css='style.css') as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
with gr.Row(variant="compact"):
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
label="Enter your prompt",
|
77 |
show_label=False,
|
78 |
max_lines=2,
|
79 |
-
placeholder="
|
80 |
).style(
|
81 |
container=False,
|
82 |
)
|
83 |
-
|
|
|
84 |
|
85 |
with gr.Row():
|
86 |
with gr.Row():
|
@@ -89,7 +117,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
89 |
with gr.Row():
|
90 |
output1 = gr.Image(label="Dreamlike Diffusion 1.0", show_label=False)
|
91 |
|
92 |
-
run.click(send_it1, inputs=[
|
93 |
with gr.Row():
|
94 |
gr.HTML(
|
95 |
|
|
|
11 |
|
12 |
text_gen = gr.Interface.load("spaces/phenomenon1981/MagicPrompt-Stable-Diffusion")
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
def get_prompts(prompt_text):
|
15 |
if prompt_text:
|
16 |
return text_gen("dreamlikeart, " + prompt_text)
|
|
|
63 |
return output1
|
64 |
|
65 |
with gr.Blocks(css='style.css') as demo:
|
66 |
+
with gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
67 |
+
RayicDegeri.com - Araba Resmi Oluşturucu Yapay Zeka Sistemi
|
68 |
+
</h1>
|
69 |
+
<h3 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
70 |
+
Lütfen, Marka: ...., Seri: ..., Model: ...., Yıl: .... şeklinde giriniz.
|
71 |
+
Örneğin: Marka: Renault, Seri: Symbol, Model: 1.5 dCi Authentique, Yıl: 2012
|
72 |
+
</h3>""")
|
73 |
+
|
74 |
with gr.Row(variant="compact"):
|
75 |
+
prompt_marka = gr.Textbox(
|
76 |
+
label="Enter your prompt",
|
77 |
+
show_label=False,
|
78 |
+
max_lines=2,
|
79 |
+
placeholder="Markanızı Giriniz. (Örneğin, Renault, BMW, AUDI)",
|
80 |
+
).style(
|
81 |
+
container=False,
|
82 |
+
)
|
83 |
+
|
84 |
+
prompt_seri = gr.Textbox(
|
85 |
+
label="Enter your prompt",
|
86 |
+
show_label=False,
|
87 |
+
max_lines=2,
|
88 |
+
placeholder="Serinizi Giriniz. (Örneğin, Clio, Symbol)",
|
89 |
+
).style(
|
90 |
+
container=False,
|
91 |
+
)
|
92 |
+
|
93 |
+
prompt_model = gr.Textbox(
|
94 |
+
label="Enter your prompt",
|
95 |
+
show_label=False,
|
96 |
+
max_lines=2,
|
97 |
+
placeholder="Modelinizi Giriniz. (Örneğin, 1.5 dCi Authentique)",
|
98 |
+
).style(
|
99 |
+
container=False,
|
100 |
+
)
|
101 |
+
|
102 |
+
prompt_yil = gr.Textbox(
|
103 |
label="Enter your prompt",
|
104 |
show_label=False,
|
105 |
max_lines=2,
|
106 |
+
placeholder="Aracınızın Yılını Giriniz. (Örneğin, 2012,2020)",
|
107 |
).style(
|
108 |
container=False,
|
109 |
)
|
110 |
+
prompts = f"Brand: {prompt_marka} / Series: {prompt_seri} / Model: {prompt_model} / Year: {prompt_yil}"
|
111 |
+
run = gr.Button("Oluştur").style(full_width=False)
|
112 |
|
113 |
with gr.Row():
|
114 |
with gr.Row():
|
|
|
117 |
with gr.Row():
|
118 |
output1 = gr.Image(label="Dreamlike Diffusion 1.0", show_label=False)
|
119 |
|
120 |
+
run.click(send_it1, inputs=[prompts, noise_level], outputs=[output1])
|
121 |
with gr.Row():
|
122 |
gr.HTML(
|
123 |
|