Spaces:
Sleeping
Sleeping
Commit
·
91718d0
1
Parent(s):
8539cc1
using gradio blocks
Browse files
app.py
CHANGED
@@ -18,6 +18,19 @@ def sashimiIentifer(input_imgFilePath):
|
|
18 |
(pred,idx,probs) = learner.predict(input_imgFilePath)
|
19 |
return dict(zip(categories, map(float, probs)))
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
(pred,idx,probs) = learner.predict(input_imgFilePath)
|
19 |
return dict(zip(categories, map(float, probs)))
|
20 |
|
21 |
+
img_examples1 = ["Hotate_Scallops.jpg", "Ahi_YellowfinAndBigeyeTuna_Sashimi.jpg"]
|
22 |
+
img_examples2 = [ "dalle_EngawaAndHotate.png"]
|
23 |
+
|
24 |
+
demo = gr.Blocks()
|
25 |
+
|
26 |
+
with demo:
|
27 |
+
with gr.Row():
|
28 |
+
input = gr.inputs.Image(shape=(192,192))
|
29 |
+
output = gr.outputs.Label()
|
30 |
+
with gr.Tab("Example Images from Web"):
|
31 |
+
examplesFromBrowser = gr.Examples(examples=img_examples1, inputs=input)
|
32 |
+
with gr.Tab("Example Images generated by AI"):
|
33 |
+
examplesFromAI = gr.Examples(examples=img_examples2,inputs=input)
|
34 |
+
input.change(fn=sashimiIentifer, inputs=input, outputs=output)
|
35 |
+
|
36 |
+
demo.launch()
|