SmilingWolf commited on
Commit
359caa2
·
verified ·
1 Parent(s): 0c11da9

Delete ORT session before loading a new one

Browse files

Small test to see if this improves app stability

Files changed (1) hide show
  1. app.py +1 -0
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