Snigs98 commited on
Commit
a01f961
·
verified ·
1 Parent(s): 92d18e4

Delete app1.py

Browse files
Files changed (1) hide show
  1. app1.py +0 -30
app1.py DELETED
@@ -1,30 +0,0 @@
1
- import gradio as gr
2
- import pandas as pd
3
- import numpy as np
4
- import joblib
5
-
6
- # Load the trained model
7
- model = joblib.load("predictive_maintenance_model.pkl")
8
-
9
- # Define the prediction function
10
- def predict_maintenance(feature1, feature2, feature3, feature4):
11
- input_data = np.array([[feature1, feature2, feature3, feature4]]) # Modify according to your dataset
12
- prediction = model.predict(input_data)
13
- return f"Predicted Maintenance Requirement: {prediction[0]}"
14
-
15
- # Create the Gradio interface
16
- interface = gr.Interface(
17
- fn=predict_maintenance,
18
- inputs=[
19
- gr.Number(label="Feature 1"),
20
- gr.Number(label="Feature 2"),
21
- gr.Number(label="Feature 3"),
22
- gr.Number(label="Feature 4"),
23
- ],
24
- outputs=gr.Textbox(label="Prediction"),
25
- title="Predictive Maintenance for Industrial Equipment",
26
- description="Enter sensor readings to predict maintenance requirements."
27
- )
28
-
29
- # Launch the app
30
- interface.launch()