Spaces:
Build error
Build error
Update app.py
Browse files1199 unmodified lines12001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126244 unmodified lines1307130813091310131113121199 unmodified linesexcept Exception as e:print(f"Error in execute_agent_query: {str(e)}")return Nonedef create_gradio_interface():"""Create and configure the Gradio interface for the ARC system."""import gradio as gr# Initialize system componentsarc_loader = ARCDataLoader()arc_evaluator = ARCEvaluator()# Create the Gradio interfaceinterface = gr.Interface(fn=process_all_tasks,inputs=None, # No input needed as files are loaded automaticallyoutputs=gr.Textbox(label="Evaluation Results",lines=20,max_lines=50,autoscroll=True),title="ARC Task Solver - Automated Evaluation",description="""Automated evaluation of ARC tasks using AI agents.Processing tasks from ./data/evaluation directory.Results will update in real-time as tasks are processed.""",live=True,allow_flagging="never",elements=[gr.Button("Start Evaluation"),gr.HTML("<div id='progress-status'>Ready to start evaluation...</div>"),gr.HTML("""<style>#progress-status {margin: 10px 0;padding: 10px;background-color: #f0f0f0;border-radius: 5px;}</style>""")])# Add custom CSS for better progress visibilityinterface.css = """.progress-bar {height: 20px;background-color: #4CAF50;transition: width 0.5s ease-in-out;}.output-box {max-height: 500px;overflow-y: auto;}"""return interfacedef load_evaluation_tasks():"""Load all JSON files from evaluation directory."""44 unmodified linesreturn tasksif __name__ == "__main__":try:1199 unmodified lines12001201120212031204120544 unmodified lines12501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101199 unmodified linesexcept Exception as e:print(f"Error in execute_agent_query: {str(e)}")return Nonedef load_evaluation_tasks():"""Load all JSON files from evaluation directory."""44 unmodified linesreturn tasksdef create_gradio_interface():"""Create and configure the Gradio interface for the ARC system."""import gradio as gr# Initialize system componentsarc_loader = ARCDataLoader()arc_evaluator = ARCEvaluator()with gr.Blocks() as interface:gr.Markdown("# ARC Task Solver - Automated Evaluation")gr.Markdown("""Automated evaluation of ARC tasks using AI agents.Processing tasks from ./data/evaluation directory.Results will update in real-time as tasks are processed.""")with gr.Row():start_button = gr.Button("Start Evaluation")status = gr.HTML("<div id='progress-status'>Ready to start evaluation...</div>")output = gr.Textbox(label="Evaluation Results",lines=20,max_lines=50,autoscroll=True)# Add custom CSSgr.HTML("""<style>#progress-status {margin: 10px 0;padding: 10px;background-color: #f0f0f0;border-radius: 5px;}.progress-bar {height: 20px;background-color: #4CAF50;transition: width 0.5s ease-in-out;}.output-box {max-height: 500px;overflow-y: auto;}</style>""")# Connect the start button to the processing functionstart_button.click(fn=process_all_tasks,outputs=output)return interfaceif __name__ == "__main__":try:
app.py+55-57