Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,14 +44,14 @@ def classify_image(input_image):
|
|
44 |
label_text = f"Predicted Class: {predicted_class}"
|
45 |
draw.text((10, 10), label_text, (255, 0, 0), font=font)
|
46 |
|
47 |
-
return output_image, class_probabilities
|
48 |
|
49 |
# Crie uma interface Gradio
|
50 |
input_interface = gr.Interface(
|
51 |
fn=classify_image,
|
52 |
inputs="image", # Especifique o tipo de entrada como "image"
|
53 |
-
outputs=["image", "text"], # Especifique
|
54 |
-
output_labels=["Output Image", "Class Probabilities"] # Rotule as saídas
|
55 |
)
|
56 |
|
57 |
# Inicie o aplicativo Gradio
|
|
|
44 |
label_text = f"Predicted Class: {predicted_class}"
|
45 |
draw.text((10, 10), label_text, (255, 0, 0), font=font)
|
46 |
|
47 |
+
return input_image[0], output_image, class_probabilities
|
48 |
|
49 |
# Crie uma interface Gradio
|
50 |
input_interface = gr.Interface(
|
51 |
fn=classify_image,
|
52 |
inputs="image", # Especifique o tipo de entrada como "image"
|
53 |
+
outputs=["image", "image", "text"], # Especifique três tipos de saída: imagem de entrada, imagem de saída e texto
|
54 |
+
output_labels=["Input Image", "Output Image", "Class Probabilities"] # Rotule as saídas
|
55 |
)
|
56 |
|
57 |
# Inicie o aplicativo Gradio
|