Spaces:
Sleeping
Sleeping
Change order of UI components
Browse filesIf large images are uploaded, makes more sense to have the buttons at the top.
app.py
CHANGED
@@ -135,19 +135,19 @@ if __name__ == "__main__":
|
|
135 |
yolos_input = gr.Image(label="Input Image", type="pil", interactive=True, mirror_webcam=False)
|
136 |
yolos_submit = gr.Button("Detect Objects", interactive=False)
|
137 |
with gr.Group():
|
|
|
138 |
yolos_gallery = gr.Gallery(label="Detected Objects", object_fit="scale-down", columns=3,
|
139 |
show_share_button=False, selected_index=None, allow_preview=False,
|
140 |
type="pil", interactive=False)
|
141 |
-
proceed_button = gr.Button("To Moondream", interactive=False)
|
142 |
|
143 |
with gr.Tab("Inference", id='moondream'):
|
144 |
with gr.Row(equal_height=False):
|
145 |
with gr.Column():
|
146 |
moon_img = gr.Image(label="Image", type="pil", interactive=True, mirror_webcam=False)
|
147 |
with gr.Group():
|
|
|
148 |
moon_prompt = gr.Textbox(label="Ask a question about the image:",
|
149 |
value="What is this food item? Include any text on labels.")
|
150 |
-
moon_submit = gr.Button("Submit", interactive=False)
|
151 |
moon_output = gr.TextArea(label="Answer", interactive=False)
|
152 |
|
153 |
# --- YOLOS --- #
|
|
|
135 |
yolos_input = gr.Image(label="Input Image", type="pil", interactive=True, mirror_webcam=False)
|
136 |
yolos_submit = gr.Button("Detect Objects", interactive=False)
|
137 |
with gr.Group():
|
138 |
+
proceed_button = gr.Button("To Moondream", interactive=False)
|
139 |
yolos_gallery = gr.Gallery(label="Detected Objects", object_fit="scale-down", columns=3,
|
140 |
show_share_button=False, selected_index=None, allow_preview=False,
|
141 |
type="pil", interactive=False)
|
|
|
142 |
|
143 |
with gr.Tab("Inference", id='moondream'):
|
144 |
with gr.Row(equal_height=False):
|
145 |
with gr.Column():
|
146 |
moon_img = gr.Image(label="Image", type="pil", interactive=True, mirror_webcam=False)
|
147 |
with gr.Group():
|
148 |
+
moon_submit = gr.Button("Submit", interactive=False)
|
149 |
moon_prompt = gr.Textbox(label="Ask a question about the image:",
|
150 |
value="What is this food item? Include any text on labels.")
|
|
|
151 |
moon_output = gr.TextArea(label="Answer", interactive=False)
|
152 |
|
153 |
# --- YOLOS --- #
|