Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,9 @@ def generate(
|
|
22 |
guidance_scale,
|
23 |
num_images_per_prompt,
|
24 |
model_precision_type,
|
25 |
-
seed
|
|
|
|
|
26 |
):
|
27 |
|
28 |
if verbose:
|
@@ -38,8 +40,10 @@ def generate(
|
|
38 |
command = f"Python_Scripts/{sd_model}.py '{prompt}' {num_inference_steps} {guidance_scale} {num_images_per_prompt} {model_precision_type} {output_image_name} {verbose_opt}"
|
39 |
|
40 |
subprocess.run(["python", "$command"])
|
|
|
|
|
41 |
|
42 |
-
return os.path.join(f"output_minecraft_skins/{
|
43 |
|
44 |
|
45 |
prompt = gr.Textbox(label="Prompt", interactive=True)
|
@@ -77,7 +81,7 @@ gr.Interface(
|
|
77 |
inputs=[prompt, stable_diffusion_model, num_inference_steps, guidance_scale, num_images_per_prompt, model_precision_type, output_image_name, verbose, seed],
|
78 |
outputs=gr.Image(label="Generated Minecraft Skin"),
|
79 |
title="Stable Diffusion Finetuned Minecraft Skin Generator",
|
80 |
-
description="Make
|
81 |
examples=examples,
|
82 |
concurrency_limit=20,
|
83 |
).launch(show_api=False)
|
|
|
22 |
guidance_scale,
|
23 |
num_images_per_prompt,
|
24 |
model_precision_type,
|
25 |
+
seed,
|
26 |
+
output_image_name,
|
27 |
+
verbose
|
28 |
):
|
29 |
|
30 |
if verbose:
|
|
|
40 |
command = f"Python_Scripts/{sd_model}.py '{prompt}' {num_inference_steps} {guidance_scale} {num_images_per_prompt} {model_precision_type} {output_image_name} {verbose_opt}"
|
41 |
|
42 |
subprocess.run(["python", "$command"])
|
43 |
+
|
44 |
+
name_output = output_image_name.value
|
45 |
|
46 |
+
return os.path.join(f"output_minecraft_skins/{name_output}")
|
47 |
|
48 |
|
49 |
prompt = gr.Textbox(label="Prompt", interactive=True)
|
|
|
81 |
inputs=[prompt, stable_diffusion_model, num_inference_steps, guidance_scale, num_images_per_prompt, model_precision_type, output_image_name, verbose, seed],
|
82 |
outputs=gr.Image(label="Generated Minecraft Skin"),
|
83 |
title="Stable Diffusion Finetuned Minecraft Skin Generator",
|
84 |
+
description="Make AI generated Minecraft Skins by a Finetuned Stable Diffusion Version!<br>Model used: https://github.com/Nick088Official/Stable_Diffusion_Finetuned_Minecraft_Skin_Generator<br>Hugging Face Space made by [Nick088](https://linktr.ee/Nick088)",
|
85 |
examples=examples,
|
86 |
concurrency_limit=20,
|
87 |
).launch(show_api=False)
|