Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
-
!pip install gradio diffusers transformers accelerate torch torchvision
|
| 2 |
-
|
| 3 |
-
from diffusers import StableDiffusionPipeline
|
| 4 |
-
import torch
|
| 5 |
import gradio as gr
|
|
|
|
|
|
|
| 6 |
from PIL import Image
|
| 7 |
|
| 8 |
-
#
|
| 9 |
model_id = "nitrosocke/Ghibli-Diffusion"
|
| 10 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 11 |
pipe.to("cuda" if torch.cuda.is_available() else "cpu")
|
|
@@ -20,8 +18,8 @@ interface = gr.Interface(
|
|
| 20 |
fn=convert_to_ghibli,
|
| 21 |
inputs=gr.Image(type="pil"),
|
| 22 |
outputs="image",
|
| 23 |
-
title="
|
| 24 |
-
description="Upload an image
|
| 25 |
)
|
| 26 |
|
| 27 |
-
interface.launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import torch
|
| 3 |
+
from diffusers import StableDiffusionPipeline
|
| 4 |
from PIL import Image
|
| 5 |
|
| 6 |
+
# Model load karna
|
| 7 |
model_id = "nitrosocke/Ghibli-Diffusion"
|
| 8 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 9 |
pipe.to("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
| 18 |
fn=convert_to_ghibli,
|
| 19 |
inputs=gr.Image(type="pil"),
|
| 20 |
outputs="image",
|
| 21 |
+
title="✨ Ghibli AI Converter 🎨",
|
| 22 |
+
description="Upload an image and get a Studio Ghibli-style version of it!"
|
| 23 |
)
|
| 24 |
|
| 25 |
+
interface.launch()
|