Spaces:
Runtime error
Runtime error
import gradio as gr | |
import pandas as pd | |
import numpy as np | |
def full_function(xml_file): | |
output_text = "yes" | |
d = {'col1': [0, 1, 2, 3], 'col2': pd.Series([2, 3], index=[2, 3])} | |
df = pd.DataFrame(data=d, index=[0, 1, 2, 3]) | |
return output_text, df | |
desc = "Upload XML file, convert to .csv file, and analyze transactions" | |
with gr.Blocks() as demo: | |
xml_file = gr.File(label = "Upload XML file here") | |
# input_employees = gr.CheckboxGroup(["Transfer Solutions", "Ordina", "PwC", "Quistor", "Full Orbit", "Accenture", "Atos", "AMIS"], label="Oracle Partners", info="Who to judge?") | |
# input_question = gr.Text(label="What activity is the Oracle Partner performing?") | |
# additional_info = gr.Text(label="Additional information (optional)") | |
output_text = gr.Text(label="R") | |
df = gr.DataFrame(label="Output table") | |
submit_btn = gr.Button("Run analysis on XML file") | |
gr.Interface(fn=full_function, inputs=xml_file, outputs=[output_text, df], title=desc).launch(share=True) |