mramjad commited on
Commit
1db03ad
·
verified ·
1 Parent(s): a801c90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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", # Disable flagging
39
- share=True # Expose a public link to the app
40
- ).launch(server_name="0.0.0.0", server_port=7860)
 
 
 
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)