import gradio as gr from Sort_Scores import * from Preinput_Merge import * with gr.Blocks() as demo: gr.Markdown("Welcome using this demo.") with gr.Tab("Sort Scores"): with gr.Row(): file1_input = gr.File() file1_output = gr.File() file1_button = gr.Button("Sort") with gr.Tab("Pre Merge"): with gr.Row(): file2_input1 = gr.File(label="smi_file") file2_input2 = gr.File(label="seq_file") file2_output = gr.File() file2_button1 = gr.Button("Strip") file2_button2 = gr.Button("Merge") with gr.Accordion("Open for More!"): gr.Markdown("Look at me...") file1_button.click(Sort_Scores, inputs=file1_input, outputs=file1_output) file2_button1.click(Strip, inputs=file2_input2, outputs=file2_output) file2_button2.click(Merge, inputs=[file2_input1, file2_input2], outputs=file2_output) if __name__ == "__main__": demo.launch()