Spaces:
Runtime error
Runtime error
Rephrase texts
Browse files16 unmodified lines1718192021222324252644 unmodified lines7172737475767716 unmodified lines# Global scope objects.###################################URL_PREFIX = "https://huggingface.co/curt-park/interactive-segmentation/resolve/main"CANVAS_HEIGHT, CANVAS_WIDTH = 600, 600POS_COLOR, NEG_COLOR = "#3498DB", "#C70039"ERR_X, ERR_Y = 5.5, 1.0MODELS = {"RITM": "ritm_coco_lvis_h18_itermask.pth"}device = torch.device("cuda" if torch.cuda.is_available() else "cpu")clicker = ck.Clicker()predictor = None44 unmodified lines# Sidebar GUI#################################### Items in the sidebar.model = st.sidebar.selectbox("Select a Model:", tuple(MODELS.keys()))threshold = st.sidebar.slider("Threshold: ", 0.0, 1.0, 0.5)marking_type = st.sidebar.radio("Click Type:", ("Positive", "Negative"))image_path = st.sidebar.file_uploader("Background Image:", type=["png", "jpg", "jpeg"])16 unmodified lines1718192021222324252644 unmodified lines7172737475767716 unmodified lines# Global scope objects.###################################URL_PREFIX = "https://huggingface.co/curt-park/interactive-segmentation/resolve/main"MODELS = {"RITM": "ritm_coco_lvis_h18_itermask.pth"}POS_COLOR, NEG_COLOR = "#3498DB", "#C70039"CANVAS_HEIGHT, CANVAS_WIDTH = 600, 600ERR_X, ERR_Y = 5.5, 1.0device = torch.device("cuda" if torch.cuda.is_available() else "cpu")clicker = ck.Clicker()predictor = None44 unmodified lines# Sidebar GUI#################################### Items in the sidebar.model = st.sidebar.selectbox("Select a Method:", tuple(MODELS.keys()))threshold = st.sidebar.slider("Threshold: ", 0.0, 1.0, 0.5)marking_type = st.sidebar.radio("Click Type:", ("Positive", "Negative"))image_path = st.sidebar.file_uploader("Background Image:", type=["png", "jpg", "jpeg"])
app.py+3-3