Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ custom_css = """
|
|
26 |
float: left;
|
27 |
}
|
28 |
.feedback-output {
|
29 |
-
width: 47%; /* Set feedback output width to
|
30 |
float: left; /* Align to the left */
|
31 |
}
|
32 |
</style>
|
@@ -72,7 +72,8 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
|
72 |
confidence_output = gr.Textbox(label="Confidence", interactive=False)
|
73 |
|
74 |
# Create a row for feedback output
|
75 |
-
|
|
|
76 |
|
77 |
# Buttons
|
78 |
with gr.Row():
|
@@ -80,7 +81,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
|
80 |
feedback_btn = gr.Button("The model was wrong", variant="secondary", elem_id="feedback_btn")
|
81 |
|
82 |
gr.Markdown("<br>") # Adding space below buttons
|
83 |
-
clear_btn = gr.Button("Clear", elem_id="clear_btn"
|
84 |
|
85 |
submit_btn.click(predict, inputs=image_input, outputs=[prediction_output, confidence_output])
|
86 |
feedback_btn.click(report_feedback, outputs=feedback_output)
|
|
|
26 |
float: left;
|
27 |
}
|
28 |
.feedback-output {
|
29 |
+
width: 47%; /* Set feedback output width to 47% */
|
30 |
float: left; /* Align to the left */
|
31 |
}
|
32 |
</style>
|
|
|
72 |
confidence_output = gr.Textbox(label="Confidence", interactive=False)
|
73 |
|
74 |
# Create a row for feedback output
|
75 |
+
with gr.Row():
|
76 |
+
feedback_output = gr.Textbox(label="Feedback Status", interactive=False, elem_classes="feedback-output") # Add class to feedback output
|
77 |
|
78 |
# Buttons
|
79 |
with gr.Row():
|
|
|
81 |
feedback_btn = gr.Button("The model was wrong", variant="secondary", elem_id="feedback_btn")
|
82 |
|
83 |
gr.Markdown("<br>") # Adding space below buttons
|
84 |
+
clear_btn = gr.Button("Clear", elem_id="clear_btn") # No need for elem_classes here
|
85 |
|
86 |
submit_btn.click(predict, inputs=image_input, outputs=[prediction_output, confidence_output])
|
87 |
feedback_btn.click(report_feedback, outputs=feedback_output)
|