Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -285,7 +285,10 @@ dict_styles = {
|
|
285 |
'Dr Strange': 'styles/learned_embeds_dr_strange.bin',
|
286 |
'GTA-5':'styles/learned_embeds_gta5.bin',
|
287 |
'Manga':'styles/learned_embeds_manga.bin',
|
288 |
-
'Pokemon':'styles/learned_embeds_pokemon.bin',
|
|
|
|
|
|
|
289 |
}
|
290 |
# dict_styles.keys()
|
291 |
|
@@ -301,13 +304,10 @@ def inference(prompt, style,seed):
|
|
301 |
|
302 |
title = "Stable Diffusion and Textual Inversion"
|
303 |
description = "A simple Gradio interface to stylize Stable Diffusion outputs"
|
304 |
-
examples =
|
305 |
-
['A man sipping tea wearing a spacesuit on the moon', '24041975', 'GTA-5']]
|
306 |
-
# Example inputs
|
307 |
-
|
308 |
|
309 |
demo = gr.Interface(inference,
|
310 |
-
inputs = [gr.Textbox(label='Prompt'), gr.Textbox(label='Seed', value='24041975'),
|
311 |
gr.Dropdown(['Dr Strange', 'GTA-5', 'Manga', 'Pokemon'], label='Style')],
|
312 |
|
313 |
outputs = [
|
@@ -315,7 +315,7 @@ demo = gr.Interface(inference,
|
|
315 |
],
|
316 |
title = title,
|
317 |
description = description,
|
318 |
-
examples = examples,
|
319 |
# cache_examples=True
|
320 |
)
|
321 |
demo.launch()
|
|
|
285 |
'Dr Strange': 'styles/learned_embeds_dr_strange.bin',
|
286 |
'GTA-5':'styles/learned_embeds_gta5.bin',
|
287 |
'Manga':'styles/learned_embeds_manga.bin',
|
288 |
+
'Pokemon':'styles/learned_embeds_pokemon.bin',
|
289 |
+
'Illustration': 'styles/learned_embeds_illustration.bin',
|
290 |
+
'Matrix':'styles/learned_embeds_matrix.bin',
|
291 |
+
'Oil Painting':'styles/learned_embeds_oil.bin',
|
292 |
}
|
293 |
# dict_styles.keys()
|
294 |
|
|
|
304 |
|
305 |
title = "Stable Diffusion and Textual Inversion"
|
306 |
description = "A simple Gradio interface to stylize Stable Diffusion outputs"
|
307 |
+
examples = [["Pink Ferrari Car", 24041975,"Manga"], ["A man sipping tea wearing a spacesuit on the moon",24041975, "GTA-5"]] # Added valid styles
|
|
|
|
|
|
|
308 |
|
309 |
demo = gr.Interface(inference,
|
310 |
+
inputs = [gr.Textbox(label='Prompt', value='Pink Ferrari Car'), gr.Textbox(label='Seed', value='24041975'),
|
311 |
gr.Dropdown(['Dr Strange', 'GTA-5', 'Manga', 'Pokemon'], label='Style')],
|
312 |
|
313 |
outputs = [
|
|
|
315 |
],
|
316 |
title = title,
|
317 |
description = description,
|
318 |
+
# examples = examples,
|
319 |
# cache_examples=True
|
320 |
)
|
321 |
demo.launch()
|