Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,12 +29,14 @@ def predict(image):
|
|
| 29 |
return labels[predicted_class_idx]
|
| 30 |
|
| 31 |
# Gradio Interface
|
| 32 |
-
gr.Interface(
|
| 33 |
fn=predict,
|
| 34 |
inputs=gr.Image(type="pil"),
|
| 35 |
outputs=gr.Label(num_top_classes=3),
|
| 36 |
title="CIFAR-10 Classifier",
|
| 37 |
description="Upload an image to classify it into CIFAR-10 categories.",
|
| 38 |
-
allow_flagging="never"
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
| 29 |
return labels[predicted_class_idx]
|
| 30 |
|
| 31 |
# Gradio Interface
|
| 32 |
+
interface = gr.Interface(
|
| 33 |
fn=predict,
|
| 34 |
inputs=gr.Image(type="pil"),
|
| 35 |
outputs=gr.Label(num_top_classes=3),
|
| 36 |
title="CIFAR-10 Classifier",
|
| 37 |
description="Upload an image to classify it into CIFAR-10 categories.",
|
| 38 |
+
allow_flagging="never" # Disable flagging
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
# Launch the Gradio app and expose a public URL
|
| 42 |
+
interface.launch(server_name="0.0.0.0", server_port=7860, share=True)
|