back to white
Browse files
app.py
CHANGED
@@ -249,7 +249,7 @@ def process_image(image_path, text_prompts, modality):
|
|
249 |
# Define Gradio interface
|
250 |
with gr.Blocks() as demo:
|
251 |
gr.HTML(MARKDOWN)
|
252 |
-
with gr.Row():
|
253 |
with gr.Column():
|
254 |
image_input = gr.Image(type="filepath", label="Input Image")
|
255 |
prompts_input = gr.Textbox(
|
@@ -270,10 +270,10 @@ with gr.Blocks() as demo:
|
|
270 |
interactive=False,
|
271 |
show_label=True
|
272 |
)
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
# Add error handling for the submit button
|
278 |
submit_btn.click(
|
279 |
fn=process_image,
|
|
|
249 |
# Define Gradio interface
|
250 |
with gr.Blocks() as demo:
|
251 |
gr.HTML(MARKDOWN)
|
252 |
+
with gr.Row():
|
253 |
with gr.Column():
|
254 |
image_input = gr.Image(type="filepath", label="Input Image")
|
255 |
prompts_input = gr.Textbox(
|
|
|
270 |
interactive=False,
|
271 |
show_label=True
|
272 |
)
|
273 |
+
with gr.Accordion("Example Prompts by Modality", open=False):
|
274 |
+
for modality, prompts in MODALITY_PROMPTS.items():
|
275 |
+
prompt_str = ", ".join(prompts)
|
276 |
+
gr.Markdown(f"**{modality}**: {prompt_str}")
|
277 |
# Add error handling for the submit button
|
278 |
submit_btn.click(
|
279 |
fn=process_image,
|