joan772 commited on
Commit
488c137
·
verified ·
1 Parent(s): f068ba5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
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
- # Stable Diffusion ka Ghibli-style model load karna
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="Studio Ghibli Image Converter 🎨",
24
- description="Upload an image, and convert it to a Studio Ghibli-style artwork!",
25
  )
26
 
27
- interface.launch(share=True)
 
 
 
 
 
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()