Spaces:
Sleeping
Sleeping
Commit
·
c2985c9
1
Parent(s):
445cf99
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,29 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
def segment(image):
|
3 |
pass # Implement your image segmentation model here...
|
4 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import numpy as np
|
3 |
+
import os
|
4 |
+
import six
|
5 |
+
import six.moves.urllib as urllib
|
6 |
+
import sys
|
7 |
+
import tarfile
|
8 |
+
import tensorflow as tf
|
9 |
+
import zipfile
|
10 |
+
import pathlib
|
11 |
+
import json
|
12 |
+
import matplotlib.pyplot as plt
|
13 |
+
from datetime import datetime
|
14 |
+
from collections import defaultdict
|
15 |
+
from io import StringIO
|
16 |
+
from matplotlib import pyplot as plt
|
17 |
+
from PIL import Image
|
18 |
+
from IPython.display import display
|
19 |
+
from object_detection.utils import ops as utils_ops
|
20 |
+
from object_detection.utils import label_map_util
|
21 |
+
from object_detection.utils import visualization_utils as vis_utils
|
22 |
+
# patch tf1 into `utils.ops`
|
23 |
+
utils_ops.tf = tf.compat.v1
|
24 |
+
|
25 |
+
# Patch the location of gfile
|
26 |
+
tf.gfile = tf.io.gfile
|
27 |
def segment(image):
|
28 |
pass # Implement your image segmentation model here...
|
29 |
|