File size: 578 Bytes
e98a02a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
from typing import Tuple

def create_image_panel() -> Tuple[gr.Image, gr.Button, gr.Textbox]:
    """Create image upload and analysis panel"""
    with gr.Row():
        with gr.Column():
            image_input = gr.Image(
                label="Upload Image",
                type="pil"
            )
            analyze_button = gr.Button("Analyze Image")
            
        with gr.Column():
            output = gr.Textbox(
                label="Analysis Result",
                lines=10
            )

    return image_input, analyze_button, output