MobvxtR commited on
Commit
87ac667
·
verified ·
1 Parent(s): 8b32f5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,8 +1,10 @@
1
  import gradio as gr
 
 
2
  from utils.preprocessing import ImageProcessor
3
 
4
- # Initialize processor (model path relative to repo)
5
- processor = ImageProcessor("models/best.pt")
6
 
7
  def process_image(input_image):
8
  if input_image is None:
@@ -20,7 +22,7 @@ def process_image(input_image):
20
  for class_name, mask in results.items()
21
  }
22
 
23
- # Gradio interface with enhanced UX
24
  with gr.Blocks(title="Fashion Segmenter") as demo:
25
  gr.Markdown("# 🧥 Fashion Item Segmenter")
26
 
 
1
  import gradio as gr
2
+ import cv2
3
+ import numpy as np
4
  from utils.preprocessing import ImageProcessor
5
 
6
+ # Initialize processor
7
+ processor = ImageProcessor("best.pt")
8
 
9
  def process_image(input_image):
10
  if input_image is None:
 
22
  for class_name, mask in results.items()
23
  }
24
 
25
+ # Gradio interface
26
  with gr.Blocks(title="Fashion Segmenter") as demo:
27
  gr.Markdown("# 🧥 Fashion Item Segmenter")
28