jie_test4 / app.py
jie1's picture
Update app.py
a6efeae
raw
history blame
2.53 kB
import gradio as gr
from Sort_Scores import *
from Preinput_Merge import *
from Sort_Dlkcat import *
from Merge_Dlsc import *
from Sort_Sco_Kcat import *
with gr.Blocks(css=".gradio-container {background-image: url('file=background.jpeg')}") as demo:
gr.Markdown("Welcome using this demo.")
with gr.Tab("HelloWorld"):
gr.Markdown("Welcome using this demo.")
gr.Markdown("This is a succend test")
gr.Markdown("I think this demo can do some things")
gr.Markdown("在sort里,可以对scores文件,dlkcat文件,以及合并后的scores与dlkcat文件进行排序")
gr.Markdown("Pre Merge里,可以将序列文件与smi文件进行合并,合并后可以进行dlkcat值的计算,合并前若序列文件需要处理换行符也可以对其进行处理")
gr.Markdown("Merge Dlsc里,可以合并scores值文件和dlkcat文件,主义这两个文件序列需要一致")
with gr.Tab("Sort"):
with gr.Row():
file1_input1 = gr.File(label="scores_file")
file1_input2 = gr.File(label="dlkcat_file")
file1_input3 = gr.File(label="kcasco_file")
file1_output = gr.File()
file1_button1 = gr.Button("Sort Scores")
file1_button2 = gr.Button("Sort Dlkcat")
file1_button3 = gr.Button("Sort Mergekcat")
with gr.Tab("Pre Merge"):
with gr.Row():
file2_input1 = gr.File(label="strip_file")
file2_input2 = gr.File(label="smi_file")
file2_input3 = gr.File(label="seq_file")
file2_output = gr.File()
file2_button1 = gr.Button("Strip")
file2_button2 = gr.Button("Merge")
with gr.Tab("Merge Dlsc"):
with gr.Row():
file4_input1 = gr.File(label="sc_file")
file4_input2 = gr.File(label="cat_file")
file4_output = gr.File()
file4_button = gr.Button("Merge")
with gr.Accordion("Open for More!"):
gr.Markdown("Look at me...")
file1_button1.click(Sort_Scores, inputs=file1_input1, outputs=file1_output)
file1_button2.click(Sort_Dlkcat, inputs=file1_input2, outputs=file1_output)
file1_button3.click(Sort_Sco_Kcat, inputs=file1_input3, outputs=file1_output)
file2_button1.click(Strip, inputs=file2_input1, outputs=file2_output)
file2_button2.click(Merge, inputs=[file2_input2, file2_input3], outputs=file2_output)
file4_button.click(Merge_Dlsc, inputs=[file4_input1, file4_input2], outputs=file4_output)
if __name__ == "__main__":
demo.launch()