Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,18 +34,10 @@ def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_
|
|
| 34 |
|
| 35 |
# view it also as 3d model or not output
|
| 36 |
if model_3d:
|
| 37 |
-
|
| 38 |
-
image = Image.open(image_path)
|
| 39 |
-
image = image.resize(resample=Image.NEAREST) # Use nearest neighbor interpolation
|
| 40 |
-
image.save(image_path)
|
| 41 |
-
return image_path, os.path.join(f"output_minecraft_skins/{filename}_3d_model.glb")
|
| 42 |
else:
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
image = image.resize(resample=Image.NEAREST) # Use nearest neighbor interpolation
|
| 46 |
-
image.save(image_path)
|
| 47 |
-
return image_path, None
|
| 48 |
-
|
| 49 |
|
| 50 |
# Define Gradio UI components
|
| 51 |
prompt = gr.Textbox(label="Your Prompt", info="What the Minecraft Skin should look like")
|
|
|
|
| 34 |
|
| 35 |
# view it also as 3d model or not output
|
| 36 |
if model_3d:
|
| 37 |
+
return os.path.join(f"output_minecraft_skins/{filename}"), os.path.join(f"output_minecraft_skins/{filename}_3d_model.glb")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
else:
|
| 39 |
+
return os.path.join(f"output_minecraft_skins/{filename}"), None
|
| 40 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
# Define Gradio UI components
|
| 43 |
prompt = gr.Textbox(label="Your Prompt", info="What the Minecraft Skin should look like")
|