HebaAllah commited on
Commit
bbd4daa
·
verified ·
1 Parent(s): cedead1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,15 +1,17 @@
1
- import gradio as gr
2
  import tensorflow as tf
3
- from PIL import Image
4
- import numpy as np
 
5
 
6
  # Load your pre-trained model
7
  def load_model():
8
- model = tf.keras.models.load_model('depi-graduation-project.ipynb') # Replace with your model's path
9
  return model
10
 
11
  model = load_model()
12
 
 
13
  # Define the labels (categories)
14
  labels = ['Water', 'Cloudy', 'Desert', 'Green Area']
15
 
 
1
+ import os
2
  import tensorflow as tf
3
+
4
+ # Disable all GPUS
5
+ os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
6
 
7
  # Load your pre-trained model
8
  def load_model():
9
+ model = tf.keras.models.load_model('satellite_model.h5') # Replace with your model's path
10
  return model
11
 
12
  model = load_model()
13
 
14
+
15
  # Define the labels (categories)
16
  labels = ['Water', 'Cloudy', 'Desert', 'Green Area']
17