asmaa1 commited on
Commit
62d9e2f
·
verified ·
1 Parent(s): 185cbf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -49,9 +49,9 @@ def query_model(input_text):
49
  return response.stdout if response.returncode == 0 else response.stderr
50
  # Load the breast cancer detection model
51
 
52
- incept_model = tf.keras.models.load_model('/content/sample_data/breast cancer/best_model_2.h5')
53
 
54
- fixed_image_url = "/content/sample_data/breast cancer/static/breast-cancer-awareness-month-1200x834.jpg"
55
 
56
 
57
 
@@ -59,17 +59,18 @@ fixed_image_url = "/content/sample_data/breast cancer/static/breast-cancer-aware
59
 
60
  examples = [
61
 
62
- ["/content/sample_data/breast cancer/malignant.png", "Malignant X-ray image."],
63
 
64
- ["/content/sample_data/breast cancer/normal.png", "X-ray image indicating normal."],
65
 
66
- ["/content/sample_data/breast cancer/benign.png", "X-ray image showing no signs of benign."]
67
 
68
  ]
69
 
70
  IMAGE_SHAPE = (224, 224)
71
 
72
- classes = ['benign', 'malignant', 'normal'] # Function to prepare the image for prediction
 
73
 
74
  def prepare_image(file):
75
 
@@ -119,7 +120,8 @@ def predict(file):
119
 
120
 
121
 
122
- return advice, fixed_image_url # Function to provide project information
 
123
 
124
  def show_info():
125
 
 
49
  return response.stdout if response.returncode == 0 else response.stderr
50
  # Load the breast cancer detection model
51
 
52
+ incept_model = tf.keras.models.load_model('best_model_2.h5')
53
 
54
+ fixed_image_url = "breast-cancer-awareness-month-1200x834.jpg"
55
 
56
 
57
 
 
59
 
60
  examples = [
61
 
62
+ ["malignant.png", "Malignant X-ray image."],
63
 
64
+ ["normal.png", "X-ray image indicating normal."],
65
 
66
+ ["benign.png", "X-ray image showing no signs of benign."]
67
 
68
  ]
69
 
70
  IMAGE_SHAPE = (224, 224)
71
 
72
+ classes = ['benign', 'malignant', 'normal']
73
+ # Function to prepare the image for prediction
74
 
75
  def prepare_image(file):
76
 
 
120
 
121
 
122
 
123
+ return advice, fixed_image_url
124
+ # Function to provide project information
125
 
126
  def show_info():
127