yuragoithf commited on
Commit
cbb0a6b
1 Parent(s): 3e7dbba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -44,12 +44,13 @@ def predict_class(image):
44
  # UI Design
45
  def classify_image(image):
46
  predicted_class = predict_class(image)
47
- return predicted_class
 
48
 
49
  inputs = gr.inputs.Image(label="Upload an image")
50
- outputs = gr.outputs.Textbox(label="Predicted Class", live=True)
51
 
52
- title = "Image Classifier"
53
  description = "Upload an image and get the predicted class."
54
 
55
- gr.Interface(fn=classify_image, inputs=inputs, outputs=outputs, title=title, description=description).launch(inline=True)
 
44
  # UI Design
45
  def classify_image(image):
46
  predicted_class = predict_class(image)
47
+ output = f"<h2>Predicted Class:</h2><p>{predicted_class}</p>"
48
+ return output
49
 
50
  inputs = gr.inputs.Image(label="Upload an image")
51
+ outputs = gr.outputs.HTML()
52
 
53
+ title = "<h1 style='text-align: center;'>Image Classifier</h1>"
54
  description = "Upload an image and get the predicted class."
55
 
56
+ gr.Interface(fn=classify_image, inputs=inputs, outputs=outputs, title=title, description=description).launch()