ccwu0918 commited on
Commit
18fdf8c
Β·
1 Parent(s): 20047b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
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
- # 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,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