Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def get_prompts(prompt_text):
|
|
| 61 |
request_counter += 1
|
| 62 |
timestamp = f"{time.time()}_{request_counter}"
|
| 63 |
if prompt_text:
|
| 64 |
-
return text_gen(
|
| 65 |
else:
|
| 66 |
return text_gen("", timestamp)
|
| 67 |
|
|
@@ -71,13 +71,22 @@ def get_prompts(prompt_text):
|
|
| 71 |
|
| 72 |
with gr.Blocks(css=".gradio-container {background-color: #FDF5E6;} footer{display:none !important;}",) as demo:
|
| 73 |
gr.HTML("""
|
| 74 |
-
<div style="text-align: center; max-width:
|
| 75 |
-
<div
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
<p style="margin-bottom: 10px; font-size: 96%">
|
| 82 |
Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs,
|
| 83 |
|
|
@@ -126,9 +135,24 @@ with gr.Blocks(css=".gradio-container {background-color: #FDF5E6;} footer{displa
|
|
| 126 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
| 127 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output2])
|
| 128 |
gr.HTML("""
|
| 129 |
-
<
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
""")
|
| 133 |
|
| 134 |
|
|
|
|
| 61 |
request_counter += 1
|
| 62 |
timestamp = f"{time.time()}_{request_counter}"
|
| 63 |
if prompt_text:
|
| 64 |
+
return text_gen( prompt_text + f" - {timestamp}")
|
| 65 |
else:
|
| 66 |
return text_gen("", timestamp)
|
| 67 |
|
|
|
|
| 71 |
|
| 72 |
with gr.Blocks(css=".gradio-container {background-color: #FDF5E6;} footer{display:none !important;}",) as demo:
|
| 73 |
gr.HTML("""
|
| 74 |
+
<div style="text-align: center; max-width: 700px; margin: 0 auto;">
|
| 75 |
+
<div
|
| 76 |
+
style="
|
| 77 |
+
display: inline-flex;
|
| 78 |
+
align-items: center;
|
| 79 |
+
gap: 0.8rem;
|
| 80 |
+
font-size: 1.75rem;
|
| 81 |
+
"
|
| 82 |
+
>
|
| 83 |
+
<div>
|
| 84 |
+
<h1 style="font-weight: 900; margin-bottom: 7px; margin-top: 5px;">
|
| 85 |
+
Dreamlike Photoreal 2.0
|
| 86 |
+
</h1>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
<p style="margin-bottom: 10px; font-size: 96%">
|
| 91 |
Noise Level: Controls how much randomness is added to the input before it is sent to the model. Higher noise level produces more diverse outputs, while lower noise level produces similar outputs,
|
| 92 |
|
|
|
|
| 135 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output1])
|
| 136 |
run.click(send_it1, inputs=[prompt, noise_level], outputs=[output2])
|
| 137 |
gr.HTML("""
|
| 138 |
+
<div class="footer" style="margin-bottom: 45px;
|
| 139 |
+
margin-top: 35px;
|
| 140 |
+
text-align: center;
|
| 141 |
+
border-bottom: 1px solid #e5e5e5"
|
| 142 |
+
>
|
| 143 |
+
<p style="font-size: .8rem;
|
| 144 |
+
display: inline-block;
|
| 145 |
+
padding: 0 10px;
|
| 146 |
+
transform: translateY(10px);
|
| 147 |
+
background: white" > Demo for <a href="https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0">Dreamlike Diffusion 1.0</a> Stable Diffusion model
|
| 148 |
</p>
|
| 149 |
+
</div>
|
| 150 |
+
<div class="acknowledgments" style="margin: 1.25em 0 .25em 0;
|
| 151 |
+
|
| 152 |
+
font-size: 96%">
|
| 153 |
+
<p> ❤️Unleash your creative side and generate mesmerizing images with just a few clicks! Enter a spark of inspiration in the "Basic Idea" text box and click the "Magic Prompt" button to elevate it to a polished masterpiece. Make any final tweaks in the "Full Prompt" box and hit the "Generate Images" button to watch your vision come to life. Experiment with the "Noise Level" for a diverse range of outputs, from similar to wildly unique. Let the fun begin!❤️
|
| 154 |
+
</p>
|
| 155 |
+
</div>
|
| 156 |
""")
|
| 157 |
|
| 158 |
|