Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import cv2
|
3 |
import gradio as gr
|
4 |
from PIL import Image
|
@@ -160,5 +161,4 @@ with gr.Blocks() as demo:
|
|
160 |
generate_masks_bu.click(fn=generate_mask, inputs=[img, prompt_mode, text_prompt], outputs=[sam_text, result_num_text, mask_result_num_text])
|
161 |
img.select(show_prompt, [img, prompt_mode, pos_point], [result_img, point_coords_text, point_labels_text, boxes_point_text, boxes_text])
|
162 |
if __name__ == '__main__':
|
163 |
-
os.system('cd/GroundingDINO && pip install -e. && cd.. && cd segment_anything && pip install -e.')
|
164 |
demo.launch()
|
|
|
1 |
import os
|
2 |
+
os.system('cd/GroundingDINO && pip install -e. && cd.. && cd segment_anything && pip install -e.')
|
3 |
import cv2
|
4 |
import gradio as gr
|
5 |
from PIL import Image
|
|
|
161 |
generate_masks_bu.click(fn=generate_mask, inputs=[img, prompt_mode, text_prompt], outputs=[sam_text, result_num_text, mask_result_num_text])
|
162 |
img.select(show_prompt, [img, prompt_mode, pos_point], [result_img, point_coords_text, point_labels_text, boxes_point_text, boxes_text])
|
163 |
if __name__ == '__main__':
|
|
|
164 |
demo.launch()
|