Pushp123 commited on
Commit
7547e65
·
verified ·
1 Parent(s): 8fd7fdd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -1,9 +1,19 @@
1
- from google.colab import drive
2
 
3
- drive.mount("/content/drive")
4
 
5
  #Data Preprocessing
6
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  import os
8
  import numpy as np
9
  import tensorflow as tf
@@ -15,7 +25,7 @@ IMAGE_SIZE = (224, 224)
15
  BATCH_SIZE = 32
16
 
17
  # Paths to your dataset
18
- TRAIN_PATH = '/content/drive/MyDrive/archive/dataset'
19
 
20
  # Data generator for loading and preprocessing images
21
  datagen = ImageDataGenerator(rescale=1./255, validation_split=0.15)
@@ -159,7 +169,7 @@ def preprocess_image(image_path):
159
  return img
160
 
161
  # Path to the image
162
- img_path = '/content/drive/MyDrive/archive/dataset/covid/01E392EE-69F9-4E33-BFCE-E5C968654078.jpeg'
163
 
164
  # Preprocess the image
165
  img_array = preprocess_image(img_path)
 
 
1
 
 
2
 
3
  #Data Preprocessing
4
 
5
+ import gradio as gr
6
+ from tensorflow.keras.models import Model
7
+ import matplotlib.pyplot as plt
8
+ import cv2 # For color mapping the heatmap
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
  import os
18
  import numpy as np
19
  import tensorflow as tf
 
25
  BATCH_SIZE = 32
26
 
27
  # Paths to your dataset
28
+ TRAIN_PATH = '/archive/dataset'
29
 
30
  # Data generator for loading and preprocessing images
31
  datagen = ImageDataGenerator(rescale=1./255, validation_split=0.15)
 
169
  return img
170
 
171
  # Path to the image
172
+ img_path = '/archive/dataset/covid/01E392EE-69F9-4E33-BFCE-E5C968654078.jpeg'
173
 
174
  # Preprocess the image
175
  img_array = preprocess_image(img_path)