abdabbas commited on
Commit
a0b676a
1 Parent(s): 8b8f5a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py CHANGED
@@ -1,3 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  def predict_image(img):
2
  img_4d=img.reshape(-1,299,299,3)
3
  img_4d=img_4d/255
 
1
+ !pip install gradio
2
+
3
+
4
+ import os
5
+ import shutil
6
+ import glob
7
+ from tqdm.notebook import tqdm
8
+ import numpy as np
9
+ import pandas as pd
10
+ import matplotlib.pyplot as plt
11
+ import seaborn as sns
12
+ import tensorflow as tf
13
+ from tensorflow import keras
14
+ import cv2
15
+ from PIL import Image
16
+ from tensorflow.keras.preprocessing.image import ImageDataGenerator
17
+ import random
18
+ from random import seed
19
+ #from livelossplot import PlotLossesKeras
20
+ import math
21
+ from tensorflow.keras.metrics import Recall,Precision,AUC
22
+ from keras.models import load_model
23
+
24
+ model = load_model('target_xception_model.h5')
25
+
26
+ class_names={0:'خبيث',1:'حميد'}
27
+
28
  def predict_image(img):
29
  img_4d=img.reshape(-1,299,299,3)
30
  img_4d=img_4d/255