eforse01 commited on
Commit
f38f576
·
verified ·
1 Parent(s): 7b5eed5

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def deploy_app(model):
2
+ """Deploy the model using Gradio."""
3
+ import gradio as gr
4
+
5
+ def predict(data_file):
6
+ data = pd.read_csv(data_file)
7
+ predictions = model.predict(data.drop(columns=['date']))
8
+ return pd.DataFrame({'Predicted Price': predictions})
9
+
10
+ interface = gr.Interface(
11
+ fn=predict,
12
+ inputs=gr.File(label="Upload CSV File"),
13
+ outputs="dataframe",
14
+ title="Electricity Price Prediction"
15
+ )
16
+ interface.launch()