mahdideveloepr commited on
Commit
e4d0fa6
·
verified ·
1 Parent(s): ec03c85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -4,6 +4,7 @@ import gradio as gr
4
  import numpy as np
5
  import torch
6
  import safetensors.torch as sf
 
7
  from PIL import Image
8
  from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
9
  from diffusers import AutoencoderKL, UNet2DConditionModel, DDIMScheduler, EulerAncestralDiscreteScheduler, DPMSolverMultistepScheduler
@@ -13,7 +14,9 @@ from briarmbg import BriaRMBG
13
  from torch.hub import download_url_to_file
14
  from spaces import ZeroGPU
15
 
 
16
  ZeroGPU.initialize()
 
17
  # نصب کتابخانه‌های مورد نیاز در صورت اجرا روی Hugging Face Spaces
18
  os.system("pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121")
19
 
 
4
  import numpy as np
5
  import torch
6
  import safetensors.torch as sf
7
+
8
  from PIL import Image
9
  from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
10
  from diffusers import AutoencoderKL, UNet2DConditionModel, DDIMScheduler, EulerAncestralDiscreteScheduler, DPMSolverMultistepScheduler
 
14
  from torch.hub import download_url_to_file
15
  from spaces import ZeroGPU
16
 
17
+ # مقداردهی اولیه ZeroGPU
18
  ZeroGPU.initialize()
19
+
20
  # نصب کتابخانه‌های مورد نیاز در صورت اجرا روی Hugging Face Spaces
21
  os.system("pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121")
22