Spaces:
Running
Running
Delete ORT session before loading a new one
Browse filesSmall test to see if this improves app stability
app.py
CHANGED
@@ -130,6 +130,7 @@ class Predictor:
|
|
130 |
self.general_indexes = sep_tags[2]
|
131 |
self.character_indexes = sep_tags[3]
|
132 |
|
|
|
133 |
model = rt.InferenceSession(model_path)
|
134 |
_, height, width, _ = model.get_inputs()[0].shape
|
135 |
self.model_target_size = height
|
|
|
130 |
self.general_indexes = sep_tags[2]
|
131 |
self.character_indexes = sep_tags[3]
|
132 |
|
133 |
+
del self.model
|
134 |
model = rt.InferenceSession(model_path)
|
135 |
_, height, width, _ = model.get_inputs()[0].shape
|
136 |
self.model_target_size = height
|