Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -285,16 +285,12 @@ def generate_with_prompt_style_guidance(prompt, style, seed=42):
|
|
| 285 |
|
| 286 |
import gradio as gr
|
| 287 |
|
| 288 |
-
dict_styles = {
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
'Matrix':'styles/learned_embeds_matrix.bin',
|
| 295 |
-
'Oil Painting':'styles/learned_embeds_oil.bin',
|
| 296 |
-
'Pokemon':'styles/learned_embeds_pokemon.bin',
|
| 297 |
-
'Stripes': 'styles/learned_embeds_stripe.bin'}
|
| 298 |
# dict_styles.keys()
|
| 299 |
|
| 300 |
def inference(prompt, style):
|
|
@@ -312,8 +308,8 @@ examples = [['A man sipping wine wearing a spacesuit on the moon', 'Stripes']]
|
|
| 312 |
|
| 313 |
demo = gr.Interface(inference,
|
| 314 |
inputs = [gr.Textbox(label='Prompt'),
|
| 315 |
-
gr.Dropdown(['
|
| 316 |
-
'Manga', '
|
| 317 |
],
|
| 318 |
outputs = [
|
| 319 |
gr.Image(label="Stable Diffusion Output"),
|
|
|
|
| 285 |
|
| 286 |
import gradio as gr
|
| 287 |
|
| 288 |
+
dict_styles = {
|
| 289 |
+
'Dr Strange': 'styles/learned_embeds_dr_strange.bin',
|
| 290 |
+
'GTA-5':'styles/learned_embeds_gta5.bin',
|
| 291 |
+
'Manga':'styles/learned_embeds_manga.bin',
|
| 292 |
+
'Pokemon':'styles/learned_embeds_pokemon.bin',
|
| 293 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
# dict_styles.keys()
|
| 295 |
|
| 296 |
def inference(prompt, style):
|
|
|
|
| 308 |
|
| 309 |
demo = gr.Interface(inference,
|
| 310 |
inputs = [gr.Textbox(label='Prompt'),
|
| 311 |
+
gr.Dropdown(['Dr Strange', 'GTA-5',
|
| 312 |
+
'Manga', 'Pokemon'], label='Style')
|
| 313 |
],
|
| 314 |
outputs = [
|
| 315 |
gr.Image(label="Stable Diffusion Output"),
|