Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
def predict_image(image_path, model):
|
| 2 |
if model == "InceptionV3":
|
| 3 |
img_size = (550, 475)
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import cv2
|
| 3 |
+
import onnxruntime
|
| 4 |
+
import numpy as np
|
| 5 |
+
|
| 6 |
+
onnx_model_vgg19_path = "./vgg19-30epochs.onnx"
|
| 7 |
+
onnx_model_inceptionv3_path = "./InceptionV3-20epochs.onnx"
|
| 8 |
+
onnx_model_resnet101_path = "./Resnet101-30epochs.onnx"
|
| 9 |
+
onnx_model_vgg16_path = "./vgg16-20epochs.onnx"
|
| 10 |
+
|
| 11 |
+
labels = ['Ajloun Castle', 'Hadrians Arch', 'Petra-siq', 'Roman Ruins-Jerash', 'Roman amphitheater', 'The Cardo Maximus of Jerash', 'Wadi Rum', 'petra-Treasury', 'umm qais']
|
| 12 |
+
|
| 13 |
+
|
| 14 |
def predict_image(image_path, model):
|
| 15 |
if model == "InceptionV3":
|
| 16 |
img_size = (550, 475)
|