Spaces:
Sleeping
Sleeping
| from .handlers import ProcessingHandler | |
| from .display import DisplayFormatter | |
| from .utils import InputValidator | |
| __all__ = ['ProcessingHandler', 'DisplayFormatter', 'InputValidator'] | |
| # # interface/app.py | |
| # import gradio as gr | |
| # from typing import List, Dict | |
| # from .handlers import process_inputs, ProcessingHandler | |
| # #from .handlers import process_inputs, ProcessingHandler | |
| # from .display import DisplayFormatter, format_results, format_error | |
| # #from .display import format_results | |
| # #from .utils import validate_inputs | |
| # from .utils import InputValidator, validate_inputs | |
| # from config.settings import config | |
| # def create_interface(): | |
| # """Create the Gradio interface""" | |
| # # Create interface components | |
| # with gr.Blocks(title="Pump Inspection Analysis") as app: | |
| # gr.Markdown("# Pump Inspection Analysis System") | |
| # with gr.Row(): | |
| # # Input components | |
| # with gr.Column(): | |
| # query = gr.Textbox( | |
| # label="What would you like to analyze?", | |
| # placeholder="e.g., Check safety issues in pump systems", | |
| # lines=3 | |
| # ) | |
| # constraints = gr.Textbox( | |
| # label="Any specific constraints? (optional)", | |
| # placeholder="e.g., Exclude routine maintenance issues", | |
| # lines=2 | |
| # ) | |
| # top_k = gr.Slider( | |
| # minimum=1, | |
| # maximum=10, | |
| # value=5, | |
| # step=1, | |
| # label="Number of top results to show" | |
| # ) | |
| # report_format = gr.Radio( | |
| # choices=["summary", "detailed"], | |
| # value="summary", | |
| # label="Report Format" | |
| # ) | |
| # images = gr.File( | |
| # file_count="multiple", | |
| # label="Upload Images", | |
| # file_types=["image"] | |
| # ) | |