Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
##!/usr/bin/python3
|
| 2 |
# -*- coding: utf-8 -*-
|
| 3 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
import cv2
|
| 5 |
from PIL import Image
|
| 6 |
import numpy as np
|
|
@@ -8,14 +14,7 @@ from segment_anything import SamPredictor, sam_model_registry
|
|
| 8 |
import torch
|
| 9 |
from diffusers import StableDiffusionBrushNetPipeline, BrushNetModel, UniPCMultistepScheduler
|
| 10 |
import random
|
| 11 |
-
|
| 12 |
import spaces
|
| 13 |
-
|
| 14 |
-
print("Installing correct gradio version...")
|
| 15 |
-
os.system("pip uninstall -y gradio")
|
| 16 |
-
os.system("pip install gradio==3.50.0")
|
| 17 |
-
print("Installing Finished!")
|
| 18 |
-
|
| 19 |
import gradio as gr
|
| 20 |
|
| 21 |
mobile_sam = sam_model_registry['vit_h'](checkpoint='data/ckpt/sam_vit_h_4b8939.pth')
|
|
|
|
| 1 |
##!/usr/bin/python3
|
| 2 |
# -*- coding: utf-8 -*-
|
| 3 |
import os
|
| 4 |
+
|
| 5 |
+
print("Installing correct gradio version...")
|
| 6 |
+
os.system("pip uninstall -y gradio")
|
| 7 |
+
os.system("pip install gradio==3.50.0")
|
| 8 |
+
print("Installing Finished!")
|
| 9 |
+
|
| 10 |
import cv2
|
| 11 |
from PIL import Image
|
| 12 |
import numpy as np
|
|
|
|
| 14 |
import torch
|
| 15 |
from diffusers import StableDiffusionBrushNetPipeline, BrushNetModel, UniPCMultistepScheduler
|
| 16 |
import random
|
|
|
|
| 17 |
import spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
import gradio as gr
|
| 19 |
|
| 20 |
mobile_sam = sam_model_registry['vit_h'](checkpoint='data/ckpt/sam_vit_h_4b8939.pth')
|