hf
Browse files- app.py +20 -0
- requirements.txt +2 -0
app.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import gradio as gr
|
3 |
+
from autogluon.tabular import TabularPredictor
|
4 |
+
|
5 |
+
|
6 |
+
def pred(path):
|
7 |
+
df = pd.read_excel(path)
|
8 |
+
a = predictor.predict(df)
|
9 |
+
df['predict'] = a
|
10 |
+
return df.sample(10)
|
11 |
+
|
12 |
+
|
13 |
+
predictor = TabularPredictor.load(p)
|
14 |
+
|
15 |
+
|
16 |
+
demo = gr.Interface(pred, "file", outputs = gr.Dataframe())
|
17 |
+
|
18 |
+
if __name__ == "__main__":
|
19 |
+
demo.launch(share = False)
|
20 |
+
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
autogluon
|
2 |
+
pandas
|