Spaces:
Runtime error
Runtime error
File size: 1,508 Bytes
a2bc65a fbb3995 a2bc65a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import gradio as gr
from gradio_scripts.file_reader import File
def Upload_Gradio(gradio_components):
with gr.Tabs():
# Tab - uploading aris files for inference
with gr.Tab("Infer ARIS"):
gr.HTML("<p align='center' style='font-size: large;font-style: italic;'>Submit an .aris file to analyze result.</p>")
#Input field for aris submission
gradio_components['input'] = File(file_types=[".aris", ".ddf"], type="binary", label="ARIS Input", file_count="multiple")
# Tab - uploading old result files to review
with gr.Tab("Open Result"):
gr.HTML("""
<p align='center' style='font-size: large;font-style: italic;'>Submit an old zip file of results to visualize.</p>
<p align='center' style='font-size: large;font-style: italic;'>If you want to edit annotations, also submit an aris file.</p>
""")
# Input for .zip result file
gradio_components['result_input'] = File(file_types=[".zip"], type="binary", label="Upload result file", file_count="multiple")
# Optional input for aris file to help with annotation editing
gradio_components['result_aris_input'] = File(file_types=[".aris", ".ddf"], type="binary", label="Upload aris file (optional)", file_count="multiple")
# Button for initializing review
gradio_components['preview_result_btn'] = gr.Button("View Result")
|