gabrielmotablima commited on
Commit
2f7ffcd
·
verified ·
1 Parent(s): 1078f51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -53,26 +53,27 @@ with gr.Blocks() as interface:
53
 
54
  ### Be patient with the Swin-GPorTuguese-2 as it is heavier than the Swin-DistilBERTimbau.
55
  """)
56
- with gr.Row():
57
- model_selector = gr.Dropdown(
58
- choices=list(models.keys()),
59
- value="laicsiifes/swin-distilbertimbau",
60
- label="Select Model"
61
- )
62
-
 
63
  gr.Markdown("""---""")
64
 
65
- with gr.Row(min_height=500, max_height=500):
66
  with gr.Column():
67
- image_display = gr.Image(type="pil", label="Image Preview", interactive=False)
68
- upload_button = gr.File(label="Upload an Image", file_types=["image"], type="filepath")
69
  with gr.Column():
70
  output_text = gr.Textbox(label="Generated Caption")
71
  generate_button = gr.Button("Generate")
72
 
73
  gr.Markdown("""---""")
74
 
75
- with gr.Row():
76
  examples = gr.Examples(predefined_images_paths, inputs=[upload_button], label="Examples")
77
 
78
  # Define logic
 
53
 
54
  ### Be patient with the Swin-GPorTuguese-2 as it is heavier than the Swin-DistilBERTimbau.
55
  """)
56
+ with gr.Row(variant='panel'):
57
+ with gr.Column():
58
+ model_selector = gr.Dropdown(
59
+ choices=list(models.keys()),
60
+ value="laicsiifes/swin-distilbertimbau",
61
+ label="Select Model"
62
+ )
63
+
64
  gr.Markdown("""---""")
65
 
66
+ with gr.Row(variant='panel'):
67
  with gr.Column():
68
+ image_display = gr.Image(type="pil", label="Image Preview", interactive=False, height=400)
69
+ upload_button = gr.File(label="Upload an Image", file_types=["image"], type="filepath", height=100)
70
  with gr.Column():
71
  output_text = gr.Textbox(label="Generated Caption")
72
  generate_button = gr.Button("Generate")
73
 
74
  gr.Markdown("""---""")
75
 
76
+ with gr.Row(variant='panel'):
77
  examples = gr.Examples(predefined_images_paths, inputs=[upload_button], label="Examples")
78
 
79
  # Define logic