Lambang commited on
Commit
682c690
1 Parent(s): 4b01c49

final succes

Browse files
Files changed (2) hide show
  1. main.py +0 -1
  2. train_pred.py +3 -3
main.py CHANGED
@@ -101,7 +101,6 @@ async def upload_file(picture: UploadFile):
101
  os.makedirs(UPLOAD_FOLDER, exist_ok=True)
102
  file_path = os.path.join(UPLOAD_FOLDER, (picture.filename))
103
 
104
-
105
 
106
  with open(file_path, 'wb') as f:
107
  f.write(picture.file.read())
 
101
  os.makedirs(UPLOAD_FOLDER, exist_ok=True)
102
  file_path = os.path.join(UPLOAD_FOLDER, (picture.filename))
103
 
 
104
 
105
  with open(file_path, 'wb') as f:
106
  f.write(picture.file.read())
train_pred.py CHANGED
@@ -39,9 +39,9 @@ class TrainPred:
39
  return history
40
 
41
  def prediction(self, model):
42
- # img_width, img_height = 200, 200
43
- # img = load_img("./static/result_upload2.jpg", target_size=(img_width, img_height))
44
- img = load_img("./static/result_upload2.jpg")
45
 
46
  img = img_to_array(img)
47
  img = img/255.0
 
39
  return history
40
 
41
  def prediction(self, model):
42
+ img_width, img_height = 200, 200
43
+ img = load_img("./static/result_upload2.jpg", target_size=(img_width, img_height))
44
+ # img = load_img("./static/result_upload2.jpg")
45
 
46
  img = img_to_array(img)
47
  img = img/255.0