Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
from utils.preprocessing import ImageProcessor
|
| 3 |
|
| 4 |
-
# Initialize processor
|
| 5 |
-
processor = ImageProcessor("
|
| 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
|
| 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 |
|