Update app.py
Browse files
app.py
CHANGED
@@ -29,13 +29,6 @@ with gr.Blocks() as demo:
|
|
29 |
gr.HTML("<h1 style='text-align: center;'>MedViT: A Vision Transformer-Driven Method for Generating Medical Reports π₯π€</h1>")
|
30 |
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>")
|
31 |
|
32 |
-
with gr.Row():
|
33 |
-
# ... (your existing image upload components)
|
34 |
-
|
35 |
-
with gr.Column(): # Column for dropdowns and model choice
|
36 |
-
max_tokens = gr.Dropdown(list(range(50, 101)), label="Max Tokens", value=75)
|
37 |
-
temperature = gr.Slider(0.5, 0.9, step=0.1, label="Temperature", value=0.7)
|
38 |
-
model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
|
39 |
|
40 |
with gr.Row():
|
41 |
sample_images = [
|
@@ -51,6 +44,14 @@ with gr.Blocks() as demo:
|
|
51 |
|
52 |
sample_images_gallery = gr.Gallery(value = sample_images,label="Sample Images")
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
with gr.Row():
|
55 |
model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
|
56 |
|
|
|
29 |
gr.HTML("<h1 style='text-align: center;'>MedViT: A Vision Transformer-Driven Method for Generating Medical Reports π₯π€</h1>")
|
30 |
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>")
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
with gr.Row():
|
34 |
sample_images = [
|
|
|
44 |
|
45 |
sample_images_gallery = gr.Gallery(value = sample_images,label="Sample Images")
|
46 |
|
47 |
+
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>")
|
48 |
+
|
49 |
+
with gr.Row():
|
50 |
+
with gr.Column(): # Column for dropdowns and model choice
|
51 |
+
max_tokens = gr.Dropdown(list(range(50, 101)), label="Max Tokens", value=75)
|
52 |
+
temperature = gr.Slider(0.5, 0.9, step=0.1, label="Temperature", value=0.7)
|
53 |
+
model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
|
54 |
+
|
55 |
with gr.Row():
|
56 |
model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
|
57 |
|