brxerq commited on
Commit
aef63da
·
verified ·
1 Parent(s): 37419e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,8 +6,10 @@ import tensorflow as tf
6
  import tensorflow_hub as hub
7
  from tensorflow.keras.models import load_model
8
  import os
 
9
 
10
  os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
 
11
  # Specify the custom objects for loading the model
12
  custom_objects = {'KerasLayer': hub.KerasLayer}
13
 
@@ -44,5 +46,4 @@ input_image = gr.Image(shape=(224, 224), label="Input Image")
44
  output_label = gr.Label(label="Predicted Bird Species")
45
 
46
  # Launch Gradio
47
- gr.Interface(fn=predict_image, inputs=input_image, outputs=output_label, capture_session=True).launch()
48
-
 
6
  import tensorflow_hub as hub
7
  from tensorflow.keras.models import load_model
8
  import os
9
+ import cv2
10
 
11
  os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
12
+
13
  # Specify the custom objects for loading the model
14
  custom_objects = {'KerasLayer': hub.KerasLayer}
15
 
 
46
  output_label = gr.Label(label="Predicted Bird Species")
47
 
48
  # Launch Gradio
49
+ gr.Interface(fn=predict_image, inputs=input_image, outputs=output_label, capture_session=True).launch()