Update app.py
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ def GetRandomPrompt():
|
|
| 54 |
return random.choice(Prompts)
|
| 55 |
|
| 56 |
def SendIt1(Inputs, NoiseLevel, DreamDiffusion=DreamDiffusion):
|
| 57 |
-
logging.info('Creating Image On
|
| 58 |
logging.info(f'Using Prompt: {Inputs}')
|
| 59 |
logging.info('Creating Image On Thread 1')
|
| 60 |
NoisedPrompt = AddNoise(Inputs, NoiseLevel)
|
|
@@ -142,16 +142,16 @@ with App.Blocks(css='style.css') as demo:
|
|
| 142 |
<div style='text-align: center; max-width: 650px; margin: 0 auto;'>
|
| 143 |
<div>
|
| 144 |
<h1 style='font-weight: 900; font-size: 3rem; margin-bottom:20px;'>
|
| 145 |
-
Dreamlike
|
| 146 |
</h1>
|
| 147 |
</div>
|
| 148 |
<p style='margin-bottom: 10px; font-size: 96%'>
|
| 149 |
-
Dreamlike
|
| 150 |
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,
|
| 151 |
-
<a created by
|
| 152 |
</p>
|
| 153 |
<p style='margin-bottom: 10px; font-size: 98%'>
|
| 154 |
-
|
| 155 |
</p>
|
| 156 |
</div>
|
| 157 |
'''
|
|
@@ -174,8 +174,8 @@ with App.Blocks(css='style.css') as demo:
|
|
| 174 |
).style(
|
| 175 |
container=False,
|
| 176 |
)
|
| 177 |
-
SeePrompts = App.Button('✨ Magic Prompt
|
| 178 |
-
RandomPrompt = App.Button('🔄️ Random Prompt
|
| 179 |
|
| 180 |
|
| 181 |
with App.Row(variant='compact'):
|
|
@@ -195,10 +195,10 @@ with App.Blocks(css='style.css') as demo:
|
|
| 195 |
|
| 196 |
with App.Row():
|
| 197 |
with App.Row():
|
| 198 |
-
Output1=App.Image(label='Dreamlike
|
| 199 |
-
Output2=App.Image(label='Dreamlike
|
| 200 |
-
Output3=App.Image(label='Dreamlike
|
| 201 |
-
Output4=App.Image(label='Dreamlike
|
| 202 |
#Output5=App.Image(label='Dreamlike PhotoReal 2.0',show_label=True)
|
| 203 |
#Output6=App.Image(label='Dreamlike PhotoReal 2.0',show_label=False)
|
| 204 |
#Output7=App.Image(label='Dreamlike PhotoReal 2.0',show_label=False)
|
|
@@ -221,7 +221,6 @@ with App.Blocks(css='style.css') as demo:
|
|
| 221 |
App.HTML(
|
| 222 |
'''
|
| 223 |
<div class='footer'>
|
| 224 |
-
<p> Demo for <a href='https://huggingface.co/dreamlike-art/dreamlike-diffusion-1.0'>Dreamlike Diffusion 1.0</a> Stable Diffusion model
|
| 225 |
<p> Demo for <a href='https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0'>Dreamlike PhotoReal 2.0</a> Stable Diffusion model
|
| 226 |
</p>
|
| 227 |
</div>
|
|
|
|
| 54 |
return random.choice(Prompts)
|
| 55 |
|
| 56 |
def SendIt1(Inputs, NoiseLevel, DreamDiffusion=DreamDiffusion):
|
| 57 |
+
logging.info('Creating Image On 4 Threads')
|
| 58 |
logging.info(f'Using Prompt: {Inputs}')
|
| 59 |
logging.info('Creating Image On Thread 1')
|
| 60 |
NoisedPrompt = AddNoise(Inputs, NoiseLevel)
|
|
|
|
| 142 |
<div style='text-align: center; max-width: 650px; margin: 0 auto;'>
|
| 143 |
<div>
|
| 144 |
<h1 style='font-weight: 900; font-size: 3rem; margin-bottom:20px;'>
|
| 145 |
+
Dreamlike PhotoReal 2.0 (x4)
|
| 146 |
</h1>
|
| 147 |
</div>
|
| 148 |
<p style='margin-bottom: 10px; font-size: 96%'>
|
| 149 |
+
Dreamlike PhotoReal 2.0 - running on CPU⚡
|
| 150 |
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,
|
| 151 |
+
<a href="https://twitter.com/DavidJohnstonxx/">created by Phenomenon1981</a>.
|
| 152 |
</p>
|
| 153 |
<p style='margin-bottom: 10px; font-size: 98%'>
|
| 154 |
+
⚡ Press the Like Button if you enjoy this space! ⚡</a>
|
| 155 |
</p>
|
| 156 |
</div>
|
| 157 |
'''
|
|
|
|
| 174 |
).style(
|
| 175 |
container=False,
|
| 176 |
)
|
| 177 |
+
SeePrompts = App.Button('✨ Magic Prompt').style(full_width=False)
|
| 178 |
+
RandomPrompt = App.Button('🔄️ Random Prompt').style(full_width=False)
|
| 179 |
|
| 180 |
|
| 181 |
with App.Row(variant='compact'):
|
|
|
|
| 195 |
|
| 196 |
with App.Row():
|
| 197 |
with App.Row():
|
| 198 |
+
Output1=App.Image(label='Dreamlike PhotoReal 2.0',show_label=True)
|
| 199 |
+
Output2=App.Image(label='Dreamlike PhotoReal 2.0',show_label=False)
|
| 200 |
+
Output3=App.Image(label='Dreamlike PhotoReal 2.0',show_label=False)
|
| 201 |
+
Output4=App.Image(label='Dreamlike PhotoReal 2.0',show_label=False)
|
| 202 |
#Output5=App.Image(label='Dreamlike PhotoReal 2.0',show_label=True)
|
| 203 |
#Output6=App.Image(label='Dreamlike PhotoReal 2.0',show_label=False)
|
| 204 |
#Output7=App.Image(label='Dreamlike PhotoReal 2.0',show_label=False)
|
|
|
|
| 221 |
App.HTML(
|
| 222 |
'''
|
| 223 |
<div class='footer'>
|
|
|
|
| 224 |
<p> Demo for <a href='https://huggingface.co/dreamlike-art/dreamlike-photoreal-2.0'>Dreamlike PhotoReal 2.0</a> Stable Diffusion model
|
| 225 |
</p>
|
| 226 |
</div>
|