Spaces:
Paused
Paused
feat: Enhance interactivity of Gradio interface and improve handling of empty response in PrecedentAnalysisWorkflow
Browse filesFiles changed (2)
- interface.py+4-4
- main.py+3
1024 unmodified lines102510261027102810291030103110322 unmodified lines103510361037103810391040104110421024 unmodified linesinputs=[state_lp_json],outputs=[search_output, state_nodes]).then(fn=lambda: gr.update(interactive=True),inputs=None,outputs=analyze_button)2 unmodified linesinputs=[text_input, url_input, file_input, input_method_state, state_lp_json],outputs=[search_output, state_nodes, state_lp_json]).then(fn=lambda: gr.update(interactive=True),inputs=None,outputs=analyze_button)1024 unmodified lines102510261027102810291030103110322 unmodified lines103510361037103810391040104110421024 unmodified linesinputs=[state_lp_json],outputs=[search_output, state_nodes]).then(fn=lambda nodes: gr.update(interactive=nodes is not None),inputs=[state_nodes],outputs=analyze_button)2 unmodified linesinputs=[text_input, url_input, file_input, input_method_state, state_lp_json],outputs=[search_output, state_nodes, state_lp_json]).then(fn=lambda nodes: gr.update(interactive=nodes is not None),inputs=[state_nodes],outputs=analyze_button)
637 unmodified lines638639640641642643637 unmodified linesposition_text = f"* [{position['source_index']}] {position['description']} "response_lines.append(position_text)response_text = "\n".join(response_lines)return StopEvent(result=response_text)else:637 unmodified lines638639640641642643644645646637 unmodified linesposition_text = f"* [{position['source_index']}] {position['description']} "response_lines.append(position_text)if not response_lines:return StopEvent(result="Жодної релевантної правової позиції у базі не знайдено.")response_text = "\n".join(response_lines)return StopEvent(result=response_text)else:
interface.py+4-4
main.py+3