Scezui commited on
Commit
0a1f0a7
·
verified ·
1 Parent(s): 902a137

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -103,12 +103,13 @@ def upload_files():
103
  return render_template('index.html')
104
 
105
 
 
106
  def make_predictions(image_paths):
107
  temp = None
108
  try:
109
  # For Windows OS
110
- temp = pathlib.PosixPath # Save the original state
111
- pathlib.PosixPath = pathlib.WindowsPath # Change to WindowsPath temporarily
112
 
113
  model_path = Path(r'model/export')
114
  learner = load_learner(model_path)
 
103
  return render_template('index.html')
104
 
105
 
106
+ from pathlib import Path
107
  def make_predictions(image_paths):
108
  temp = None
109
  try:
110
  # For Windows OS
111
+ # temp = pathlib.PosixPath # Save the original state
112
+ # pathlib.PosixPath = pathlib.WindowsPath # Change to WindowsPath temporarily
113
 
114
  model_path = Path(r'model/export')
115
  learner = load_learner(model_path)