Spaces:
Runtime error
Runtime error
JunchuanYu
commited on
Commit
·
6f6b218
1
Parent(s):
ff25bcf
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,10 @@ import glob
|
|
9 |
import gradio as gr
|
10 |
from PIL import Image
|
11 |
from segment_anything import SamAutomaticMaskGenerator, SamPredictor, sam_model_registry
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
matplotlib.pyplot.switch_backend('Agg') # for matplotlib to work in gradio
|
16 |
#setup model
|
|
|
9 |
import gradio as gr
|
10 |
from PIL import Image
|
11 |
from segment_anything import SamAutomaticMaskGenerator, SamPredictor, sam_model_registry
|
12 |
+
|
13 |
+
os.system("python -m pip install --upgrade pip")
|
14 |
+
os.system("pip uninstall -y gradio")
|
15 |
+
os.system("pip install gradio==3.27.0")
|
16 |
|
17 |
matplotlib.pyplot.switch_backend('Agg') # for matplotlib to work in gradio
|
18 |
#setup model
|