Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def main():
|
|
113 |
device = config['device']
|
114 |
model = load_model(config, device=device)
|
115 |
# Define Gradio interface for inference
|
116 |
-
def
|
117 |
"""Quick and simple check.
|
118 |
|
119 |
Args:
|
@@ -129,7 +129,7 @@ def main():
|
|
129 |
input_image = gr.Image(type="pil", label="Upload Image")
|
130 |
with gr.Column():
|
131 |
output = gr.JSON(label="Classification Result")
|
132 |
-
input_image.change(fn=
|
133 |
# Launch the Gradio app
|
134 |
demo.launch()
|
135 |
|
|
|
113 |
device = config['device']
|
114 |
model = load_model(config, device=device)
|
115 |
# Define Gradio interface for inference
|
116 |
+
def simple_predict(input_image):
|
117 |
"""Quick and simple check.
|
118 |
|
119 |
Args:
|
|
|
129 |
input_image = gr.Image(type="pil", label="Upload Image")
|
130 |
with gr.Column():
|
131 |
output = gr.JSON(label="Classification Result")
|
132 |
+
input_image.change(fn=simple_predict, inputs=input_image, outputs=output)
|
133 |
# Launch the Gradio app
|
134 |
demo.launch()
|
135 |
|