Mustafa Al Hamad commited on
Commit
9a92a09
·
1 Parent(s): e78b07d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -190,6 +190,8 @@ def greet(operation,filer):
190
  if item.endswith(".sav") and int(item.split("=")[0]) > maxnum:
191
  maxnum = int(item.split("=")[0])
192
  modelname = item
 
 
193
  #modelname = "VotingClassifier=0.95756598831352.sav"
194
  loaded_model = pickle.load(open(modelname, 'rb'))
195
  droppers = 0
 
190
  if item.endswith(".sav") and int(item.split("=")[0]) > maxnum:
191
  maxnum = int(item.split("=")[0])
192
  modelname = item
193
+ if maxnum == 0:
194
+ return None,"No model found, please use retrain operation to build one"
195
  #modelname = "VotingClassifier=0.95756598831352.sav"
196
  loaded_model = pickle.load(open(modelname, 'rb'))
197
  droppers = 0