eyad222 commited on
Commit
6bfcf21
·
verified ·
1 Parent(s): eb7d8a0

Upload 3 files

Browse files
Files changed (3) hide show
  1. app.py +22 -0
  2. requirements.txt +6 -0
  3. stack_model_Kepler2.pkl +3 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+ import joblib
4
+
5
+ # Load your trained pipeline
6
+ model = joblib.load("full_pipeline.pkl")
7
+
8
+ def predict_from_csv(file):
9
+ df = pd.read_csv(file.name)
10
+ preds = model.predict(df)
11
+ return pd.DataFrame({"prediction": preds})
12
+
13
+ iface = gr.Interface(
14
+ fn=predict_from_csv,
15
+ inputs=gr.File(file_types=[".csv"]),
16
+ outputs="dataframe",
17
+ title="CSV Classifier",
18
+ description="Upload a CSV file with the correct columns, and the model will predict."
19
+ )
20
+
21
+ if __name__ == "__main__":
22
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ scikit-learn
2
+ xgboost
3
+ pandas
4
+ numpy
5
+ joblib
6
+ gradio
stack_model_Kepler2.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5926e8ef3941084aeb399b5949c1a4a094c624656ed1522b8257f55c0ca5ceab
3
+ size 160902955