koesan commited on
Commit
33a0083
·
verified ·
1 Parent(s): 3cb6d08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -18,15 +18,15 @@ app.config['UPLOAD_FOLDER'] = 'uploads'
18
  # Create uploads folder if it doesn't exist
19
  os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
20
 
21
- # Load the model with TensorFlow 2.0
22
- print("Loading model with TensorFlow 2.0...")
23
  import warnings
24
  warnings.filterwarnings('ignore')
25
 
26
  try:
27
- # TensorFlow 2.0 should handle Functional models
28
  model = load_model('cancer_model.h5', compile=False)
29
- print("✓ Model loaded successfully with TensorFlow 2.0!")
30
  except Exception as e:
31
  print(f"❌ Error loading model: {e}")
32
  import traceback
 
18
  # Create uploads folder if it doesn't exist
19
  os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
20
 
21
+ # Load the model with TensorFlow 2.1.0 (February 2020 version)
22
+ print("Loading model with TensorFlow 2.1.0 (Feb 2020)...")
23
  import warnings
24
  warnings.filterwarnings('ignore')
25
 
26
  try:
27
+ # Load model as it was saved in Feb 2020
28
  model = load_model('cancer_model.h5', compile=False)
29
+ print("✓ Model loaded successfully!")
30
  except Exception as e:
31
  print(f"❌ Error loading model: {e}")
32
  import traceback