vaniv commited on
Commit
c219f57
·
verified ·
1 Parent(s): 76335e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -64,12 +64,11 @@ def predict(image):
64
  return f"Predicted category: {pred_class}\nRecommended complementary item: {garment_recommendation} in {color_recommendation}"
65
 
66
  def gradio_predict(image):
67
- image = Image.open(image).convert('RGB')
68
  return predict(image)
69
 
70
  interface = gr.Interface(
71
  fn=gradio_predict,
72
- inputs=gr.Image(shape=(224, 224)), # Changed from gr.inputs.Image
73
  outputs="text",
74
  title="Outfit Recommender",
75
  description="Upload an image of a garment to get a recommendation for a complementary outfit based on fashion theory."
 
64
  return f"Predicted category: {pred_class}\nRecommended complementary item: {garment_recommendation} in {color_recommendation}"
65
 
66
  def gradio_predict(image):
 
67
  return predict(image)
68
 
69
  interface = gr.Interface(
70
  fn=gradio_predict,
71
+ inputs=gr.Image(type="pil"), # Changed to use 'type="pil"' instead of 'shape'
72
  outputs="text",
73
  title="Outfit Recommender",
74
  description="Upload an image of a garment to get a recommendation for a complementary outfit based on fashion theory."