Spaces:
Running
on
A100
Running
on
A100
am
commited on
Commit
·
38da510
1
Parent(s):
945806b
title
Browse files
app.py
CHANGED
|
@@ -83,29 +83,32 @@ def model_inference(
|
|
| 83 |
|
| 84 |
with gr.Blocks() as demo:
|
| 85 |
|
| 86 |
-
|
| 87 |
send_btn = gr.Button("Send", variant="primary", render=False)
|
| 88 |
textbox = gr.Textbox(show_label=False, placeholder="Enter your text here and press ENTER", render=False, submit_btn="Send")
|
| 89 |
|
| 90 |
with gr.Row():
|
| 91 |
with gr.Column(scale=1):
|
| 92 |
image_input = gr.Image(type="pil", visible=True, sources="upload", show_label=False)
|
| 93 |
-
|
| 94 |
clear_btn = gr.Button("Clear", variant="secondary")
|
| 95 |
|
| 96 |
-
|
| 97 |
-
examples=[
|
| 98 |
-
["example_images/35.jpg", "Examine the chest X-ray."],
|
| 99 |
-
["example_images/363.jpg", "Provide a comprehensive image analysis, and list all abnormalities."],
|
| 100 |
-
["example_images/4747.jpg", "Find abnormalities and support devices."],
|
| 101 |
-
["example_images/87.jpg", "Find abnormalities and support devices."],
|
| 102 |
-
["example_images/6218.jpg", "Find abnormalities and support devices."],
|
| 103 |
-
["example_images/6447.jpg", "Find abnormalities and support devices."],
|
| 104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
with gr.Column(scale=2):
|
| 111 |
chat_interface = gr.ChatInterface(fn=model_inference,
|
|
|
|
| 83 |
|
| 84 |
with gr.Blocks() as demo:
|
| 85 |
|
| 86 |
+
gr.Markdown('<h1 style="text-align:center; margin: 0.2em 0; color: green;">NV-Reason-CXR-3B Demo. Check out the model card details <a href="https://huggingface.co/nvidia/NV-Reason-CXR-3B" target="_blank">here</a>.</h1>')
|
| 87 |
send_btn = gr.Button("Send", variant="primary", render=False)
|
| 88 |
textbox = gr.Textbox(show_label=False, placeholder="Enter your text here and press ENTER", render=False, submit_btn="Send")
|
| 89 |
|
| 90 |
with gr.Row():
|
| 91 |
with gr.Column(scale=1):
|
| 92 |
image_input = gr.Image(type="pil", visible=True, sources="upload", show_label=False)
|
|
|
|
| 93 |
clear_btn = gr.Button("Clear", variant="secondary")
|
| 94 |
|
| 95 |
+
with gr.Accordion("Examples", open=True):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
+
ex =gr.Examples(
|
| 98 |
+
examples=[
|
| 99 |
+
["example_images/35.jpg", "Examine the chest X-ray."],
|
| 100 |
+
["example_images/363.jpg", "Provide a comprehensive image analysis, and list all abnormalities."],
|
| 101 |
+
["example_images/4747.jpg", "Find abnormalities and support devices."],
|
| 102 |
+
["example_images/87.jpg", "Find abnormalities and support devices."],
|
| 103 |
+
["example_images/6218.jpg", "Find abnormalities and support devices."],
|
| 104 |
+
["example_images/6447.jpg", "Find abnormalities and support devices."],
|
| 105 |
|
| 106 |
+
|
| 107 |
+
],
|
| 108 |
+
inputs=[image_input, textbox],
|
| 109 |
+
label=None,
|
| 110 |
+
)
|
| 111 |
+
ex.dataset.show_label = False
|
| 112 |
|
| 113 |
with gr.Column(scale=2):
|
| 114 |
chat_interface = gr.ChatInterface(fn=model_inference,
|