Spaces:
Build error
Build error
Anthony-Ml
commited on
Commit
•
142aa6a
1
Parent(s):
6088cd1
Update app.py
Browse files
app.py
CHANGED
@@ -86,10 +86,10 @@ with gr.Blocks() as demo:
|
|
86 |
with gr.Row():
|
87 |
with gr.Column():
|
88 |
input_img = gr.Image(label="Input Image", shape=(224, 224))
|
89 |
-
|
90 |
-
|
91 |
with gr.Column():
|
92 |
-
|
93 |
with gr.Column():
|
94 |
interpretation = gr.components.Interpretation(input_img)
|
95 |
interpret.click(interpretation_function(get_image,learn, learn.layer4[-1],target_category=None), input_img, interpretation)
|
@@ -98,6 +98,6 @@ with gr.Blocks() as demo:
|
|
98 |
#interpretation="default"
|
99 |
enable_queue=True
|
100 |
|
101 |
-
gr.Interface(fn=predict_image, inputs=gr.Image(shape=(224,224)),
|
102 |
outputs = gr.Label(num_top_classes=3),title=title,description=description,examples=examples, interpretation=interpretation,enable_queue=enable_queue).launch(share=False)
|
103 |
|
|
|
86 |
with gr.Row():
|
87 |
with gr.Column():
|
88 |
input_img = gr.Image(label="Input Image", shape=(224, 224))
|
89 |
+
with gr.Row():
|
90 |
+
interpret = gr.Button("Interpret")
|
91 |
with gr.Column():
|
92 |
+
label = gr.Label(label="Predicted Class")
|
93 |
with gr.Column():
|
94 |
interpretation = gr.components.Interpretation(input_img)
|
95 |
interpret.click(interpretation_function(get_image,learn, learn.layer4[-1],target_category=None), input_img, interpretation)
|
|
|
98 |
#interpretation="default"
|
99 |
enable_queue=True
|
100 |
|
101 |
+
demo = gr.Interface(fn=predict_image, inputs=gr.Image(shape=(224,224)),
|
102 |
outputs = gr.Label(num_top_classes=3),title=title,description=description,examples=examples, interpretation=interpretation,enable_queue=enable_queue).launch(share=False)
|
103 |
|