Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,16 +26,9 @@ def generate_caption_vitCoAtt(image):
|
|
| 26 |
|
| 27 |
|
| 28 |
with gr.Row():
|
| 29 |
-
|
| 30 |
-
gr.HTML("<h1 style='text-align: center;'>MedViT: A Vision Transformer-Driven Method for Generating Medical Reports 🏥🤖</h1>")
|
| 31 |
-
gr.HTML("<p style='text-align: center;'>You can generate captions by uploading an X-Ray and selecting a model of your choice below</p>")
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
image = gr.Image(label="Upload Chest X-ray", type="pil")
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
gr.HTML("<p style='text-align: center;'> Please select the Number of Max Tokens and Temperature setting, if you are testing CLIP GPT2 and VIT GPT2 Models</p>")
|
| 38 |
|
|
|
|
|
|
|
| 39 |
|
| 40 |
with gr.Row():
|
| 41 |
|
|
@@ -71,7 +64,9 @@ interface = gr.Interface(
|
|
| 71 |
inputs = [image, model_choice, max_tokens, temperature],
|
| 72 |
theme="soft",
|
| 73 |
outputs=caption,
|
| 74 |
-
examples = examples
|
|
|
|
|
|
|
| 75 |
)
|
| 76 |
|
| 77 |
interface.launch(debug=True)
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
image = gr.Image(label="Upload Chest X-ray", type="pil")
|
| 31 |
+
|
| 32 |
|
| 33 |
with gr.Row():
|
| 34 |
|
|
|
|
| 64 |
inputs = [image, model_choice, max_tokens, temperature],
|
| 65 |
theme="soft",
|
| 66 |
outputs=caption,
|
| 67 |
+
examples = examples,
|
| 68 |
+
title = title,
|
| 69 |
+
description = description
|
| 70 |
)
|
| 71 |
|
| 72 |
interface.launch(debug=True)
|