import pandas as pd | |
import gradio as gr | |
from autogluon.tabular import TabularPredictor | |
def pred(path): | |
df = pd.read_excel(path) | |
a = predictor.predict(df) | |
df['predict'] = a | |
return df.sample(10) | |
predictor = TabularPredictor.load(p) | |
demo = gr.Interface(pred, "file", outputs = gr.Dataframe()) | |
if __name__ == "__main__": | |
demo.launch(share = False) | |