Scezui commited on
Commit
5bc4c7c
1 Parent(s): 6df3c38

removed posix

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -104,8 +104,8 @@ def make_predictions(image_paths):
104
  temp = None
105
  try:
106
  # For Windows OS
107
- temp = pathlib.PosixPath # Save the original state
108
- pathlib.PosixPath = pathlib.WindowsPath # Change to WindowsPath temporarily
109
 
110
  model_path = Path(r'model/export')
111
  learner = load_learner(model_path)
@@ -129,8 +129,8 @@ def make_predictions(image_paths):
129
  except Exception as e:
130
  return {"error in make_predictions": str(e)}
131
 
132
- finally:
133
- pathlib.PosixPath = temp
134
 
135
  import copy
136
  @app.route('/predict/<filenames>', methods=['GET', 'POST'])
 
104
  temp = None
105
  try:
106
  # For Windows OS
107
+ # temp = pathlib.PosixPath # Save the original state
108
+ # pathlib.PosixPath = pathlib.WindowsPath # Change to WindowsPath temporarily
109
 
110
  model_path = Path(r'model/export')
111
  learner = load_learner(model_path)
 
129
  except Exception as e:
130
  return {"error in make_predictions": str(e)}
131
 
132
+ # finally:
133
+ # pathlib.PosixPath = temp
134
 
135
  import copy
136
  @app.route('/predict/<filenames>', methods=['GET', 'POST'])