Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,13 +46,13 @@ image = gr.Image(shape=(256, 256), label="ιιθειγζδΊζ°΄ηΊγζ΄
|
|
| 46 |
label = gr.Label(num_top_classes=5, label="AIθΎ¨θη΅ζ")
|
| 47 |
some_text="ζθ½θΎ¨θιιθειγζδΊζ°΄ηΊγζ΄ει³₯γζΎεΌ΅ιιθειγζδΊζ°΄ηΊγζ΄ει³₯η
§ηδΎθζε§!"
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
|
| 57 |
iface = gr.Interface(fn=classify_image,
|
| 58 |
inputs=image,
|
|
@@ -64,6 +64,7 @@ iface = gr.Interface(fn=classify_image,
|
|
| 64 |
# def greet(name):
|
| 65 |
|
| 66 |
# model = load_model('my_cnn_model.h5') # Loading the Tensorflow Saved Model (PB)
|
|
|
|
| 67 |
|
| 68 |
# return "Hello " + name + "!!" + model.summary()
|
| 69 |
|
|
|
|
| 46 |
label = gr.Label(num_top_classes=5, label="AIθΎ¨θη΅ζ")
|
| 47 |
some_text="ζθ½θΎ¨θιιθειγζδΊζ°΄ηΊγζ΄ει³₯γζΎεΌ΅ιιθειγζδΊζ°΄ηΊγζ΄ει³₯η
§ηδΎθζε§!"
|
| 48 |
|
| 49 |
+
sample_images = []
|
| 50 |
+
for i in range(5):
|
| 51 |
+
thedir = base_dir + image_folders[i]
|
| 52 |
+
for file in os.listdir(thedir):
|
| 53 |
+
if file == ".git" or file == ".ipynb_checkpoints":
|
| 54 |
+
continue
|
| 55 |
+
sample_images.append(image_folders[i] + '/' + file)
|
| 56 |
|
| 57 |
iface = gr.Interface(fn=classify_image,
|
| 58 |
inputs=image,
|
|
|
|
| 64 |
# def greet(name):
|
| 65 |
|
| 66 |
# model = load_model('my_cnn_model.h5') # Loading the Tensorflow Saved Model (PB)
|
| 67 |
+
|
| 68 |
|
| 69 |
# return "Hello " + name + "!!" + model.summary()
|
| 70 |
|