venkyvicky commited on
Commit
86195fe
Β·
verified Β·
1 Parent(s): c3391cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -80,13 +80,23 @@ def classify_image(image):
80
  print(f"[ERROR] Exception during classification: {e}")
81
  return "Error in classification. Check console for details."
82
 
 
 
 
 
 
 
 
 
 
83
  # βœ… **Gradio Interface**
84
  interface = gr.Interface(
85
  fn=classify_image,
86
  inputs=gr.Image(type="numpy"),
87
  outputs="text",
88
  title="Clothing1M Image Classifier",
89
- description="Upload a clothing image, and the model will classify it into one of the 14 categories."
 
90
  )
91
 
92
  # βœ… **Run the Interface**
 
80
  print(f"[ERROR] Exception during classification: {e}")
81
  return "Error in classification. Check console for details."
82
 
83
+ # βœ… **Sample Images (Can be URLs or Local Paths)**
84
+ sample_images = [
85
+ "img1.jpg", # Replace with actual URLs or local paths
86
+ "img2.jpg",
87
+ "img3.jpg",
88
+ "img4.jpg",
89
+ "img5.jpg"
90
+ ]
91
+
92
  # βœ… **Gradio Interface**
93
  interface = gr.Interface(
94
  fn=classify_image,
95
  inputs=gr.Image(type="numpy"),
96
  outputs="text",
97
  title="Clothing1M Image Classifier",
98
+ description="Upload a clothing image, or select a sample below, and the model will classify it into one of the 14 categories.",
99
+ examples=sample_images # βœ… Predefined images for users to try
100
  )
101
 
102
  # βœ… **Run the Interface**