Spaces:
Sleeping
Sleeping
nazlicanto
commited on
Commit
•
046c340
1
Parent(s):
81220ff
model_dir update w/ absolute path
Browse files
app06.py
CHANGED
@@ -6,7 +6,10 @@ import numpy as np
|
|
6 |
import torch
|
7 |
|
8 |
# Load the model and processor
|
9 |
-
model_dir = "defectdetection/model
|
|
|
|
|
|
|
10 |
model = SegformerForSemanticSegmentation.from_pretrained(model_dir)
|
11 |
processor = SegformerImageProcessor.from_pretrained(model_dir)
|
12 |
model.eval()
|
|
|
6 |
import torch
|
7 |
|
8 |
# Load the model and processor
|
9 |
+
model_dir = "/home/user/app/defectdetection/model"
|
10 |
+
model = SegformerForSemanticSegmentation.from_pretrained(model_path)
|
11 |
+
preprocessor = SegformerImageProcessor.from_pretrained(model_path)
|
12 |
+
|
13 |
model = SegformerForSemanticSegmentation.from_pretrained(model_dir)
|
14 |
processor = SegformerImageProcessor.from_pretrained(model_dir)
|
15 |
model.eval()
|