santanche commited on
Commit
bd27e5d
·
1 Parent(s): e795a04

feat (app): first setup

Browse files
Dockerfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ COPY --chown=user . /app
13
+ CMD ["uvicorn", "server_factory_predictor:app", "--host", "0.0.0.0", "--port", "8000"]
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
- title: Factory Ml
3
- emoji: 🌖
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: docker
 
1
  ---
2
+ title: Factory ML
3
+ emoji: 🏭
4
  colorFrom: indigo
5
  colorTo: yellow
6
  sdk: docker
evaluate.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ temperature,pressure,diagnosis
2
+ 77,153,N
3
+ 93,170,N
4
+ 87,43,P
5
+ 49,198,P
6
+ 110,30,P
7
+ 68,142,N
8
+ 104,38,P
9
+ 55,175,P
10
+ 82,157,N
11
+ 96,55,P
factory_predictor.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from sklearn.linear_model import LogisticRegression
3
+ from sklearn.preprocessing import LabelEncoder
4
+ from sklearn.metrics import accuracy_score
5
+
6
+ class FactoryPredictor:
7
+ def __init__(self):
8
+ self.model = LogisticRegression()
9
+ self.le_diagnosis = LabelEncoder()
10
+ self.temperature = 0
11
+ self.pressure = 0
12
+
13
+ def train(self, csv_train='train.csv', csv_test='test.csv'):
14
+ # Load the train data
15
+ data_train = pd.read_csv(csv_train)
16
+
17
+ # Encode categorical variables
18
+ data_train['diagnosis'] = self.le_diagnosis.fit_transform(data_train['diagnosis'])
19
+
20
+ # Split features and target
21
+ X_train = data_train[
22
+ ['temperature', 'pressure']]
23
+ y_train = data_train['diagnosis']
24
+
25
+ # Train the model
26
+ self.model.fit(X_train, y_train)
27
+
28
+ # Load the test data
29
+ data_test = pd.read_csv(csv_test)
30
+
31
+ # Encode categorical variables
32
+ data_test['diagnosis'] = self.le_diagnosis.fit_transform(data_test['diagnosis'])
33
+
34
+ # Split features and target
35
+ X_test = data_test[
36
+ ['temperature', 'pressure']]
37
+ y_test = data_test['diagnosis']
38
+
39
+ # Evaluate the model
40
+ y_pred = self.model.predict(X_test)
41
+ accuracy = accuracy_score(y_test, y_pred)
42
+ print(f"Model accuracy: {accuracy:.2f}")
43
+
44
+ def inform_temperature(self, temperature):
45
+ self.temperature = temperature
46
+ if self.pressure > 0:
47
+ return self.predict(self.temperature, self.pressure)
48
+ return 'N'
49
+
50
+ def inform_pressure(self, pressure):
51
+ self.pressure = pressure
52
+ if self.temperature > 0:
53
+ return self.predict(self.temperature, self.pressure)
54
+ return 'N'
55
+
56
+ def predict(self, temperature, pressure):
57
+ # Create a DataFrame with the same feature names as the training data
58
+ input_data = pd.DataFrame(
59
+ [[temperature, pressure]],
60
+ columns=['temperature', 'pressure'])
61
+
62
+ # Make prediction
63
+ prediction = self.model.predict(input_data)
64
+
65
+ # Decode prediction
66
+ diagnosis = self.le_diagnosis.inverse_transform(prediction)[0]
67
+
68
+ return diagnosis
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ fastapi
2
+ uvicorn[standard]
3
+ pandas
4
+ scikit-learn
server_factory_predictor.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI, HTTPException, BackgroundTasks
2
+ from fastapi.responses import RedirectResponse
3
+ from fastapi.middleware.cors import CORSMiddleware
4
+ from fastapi.responses import FileResponse
5
+ from fastapi.staticfiles import StaticFiles
6
+ import uvicorn
7
+ import os
8
+
9
+ # Import the FactoryPredictor class
10
+ from factory_predictor import FactoryPredictor
11
+
12
+ app = FastAPI()
13
+
14
+ # Serve static files
15
+ app.mount("/static", StaticFiles(directory="static"), name="static")
16
+
17
+ app.add_middleware(
18
+ CORSMiddleware,
19
+ allow_origins=["http://127.0.0.1:5173","http://localhost:5173","http://127.0.0.1:8000","http://localhost:8000"],
20
+ allow_credentials=True,
21
+ allow_methods=["*"],
22
+ allow_headers=["*"],
23
+ )
24
+
25
+ # Create a global instance of FactoryPredictor
26
+ predictor = FactoryPredictor()
27
+
28
+ # Global variable to store training status
29
+ training_status = "Not started"
30
+
31
+ # Redirect root to /docs
32
+ @app.get("/")
33
+ def root():
34
+ return RedirectResponse(url="/editor/")
35
+
36
+ @app.get("/editor/")
37
+ def get_editor():
38
+ return FileResponse(os.path.join("static", "editor", "index.html"))
39
+
40
+ def train_model():
41
+ global training_status
42
+ training_status = "In progress"
43
+ try:
44
+ predictor.train()
45
+ training_status = "Completed"
46
+ except Exception as e:
47
+ training_status = f"Failed: {str(e)}"
48
+
49
+ @app.post("/train")
50
+ async def train(background_tasks: BackgroundTasks):
51
+ background_tasks.add_task(train_model)
52
+ return {"message": "Training started in the background"}
53
+
54
+ @app.get("/training_status")
55
+ async def get_training_status():
56
+ return {"status": training_status}
57
+
58
+ @app.get("/predict")
59
+ async def predict(temperature: int, pressure: int):
60
+ if training_status != "Completed":
61
+ raise HTTPException(status_code=400, detail="Model not trained yet")
62
+ try:
63
+ predicted_diagnosis = predictor.predict(temperature, pressure)
64
+ return {"diagnosis": str(predicted_diagnosis)}
65
+ except Exception as e:
66
+ raise HTTPException(status_code=500, detail=str(e)) from e
67
+
68
+ @app.post("/inform_temperature")
69
+ async def inform_temperature(value: int):
70
+ if training_status != "Completed":
71
+ raise HTTPException(status_code=400, detail="Model not trained yet")
72
+ try:
73
+ predicted_diagnosis = predictor.inform_temperature(value)
74
+ return str(predicted_diagnosis)
75
+ except Exception as e:
76
+ raise HTTPException(status_code=500, detail=str(e)) from e
77
+
78
+ @app.post("/inform_pressure")
79
+ async def inform_pressure(value: int):
80
+ if training_status != "Completed":
81
+ raise HTTPException(status_code=400, detail="Model not trained yet")
82
+ try:
83
+ predicted_diagnosis = predictor.inform_pressure(value)
84
+ return str(predicted_diagnosis)
85
+ except Exception as e:
86
+ raise HTTPException(status_code=500, detail=str(e)) from e
87
+
88
+ if __name__ == "__main__":
89
+ uvicorn.run(app, host="0.0.0.0", port=8000)
static/editor/index.html ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Playground Editor</title>
6
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.0/full.min.css">
7
+ <script type="module" src="/static/editor/js/editor-rest.js"></script>
8
+ <script type="module">
9
+ import { EditorPg } from '/static/editor/js/editor-pg.js'
10
+ window.editorPg = EditorPg.i
11
+ </script>
12
+ </head>
13
+ <body onload="editorPg.start()">
14
+ <oid-sphere assets="https://mundorum.github.io/oid/oid/playground/assets/" stydefault="https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.0/full.min.css" global></oid-sphere>
15
+ <div style="width:100%;height:100vh;display:flex;flex-direction:column">
16
+ <div style="width:100%">
17
+ <h2>
18
+ <oid-sphere id="control" stylesheets="https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.0/"
19
+ style="display: flex; align-items: center; gap: 20px;">
20
+ Playground Editor
21
+ <file-oid label="Composition" publish="dispatch~file/loaded" style="width:200px"></file-oid>
22
+ <select id="oid-list" class="btn btn-secondary">
23
+ <option value="" selected>Select an id</option>
24
+ </select>
25
+ <button-oid label="Render" publish="click~control/render"></button-oid>
26
+ <button-oid label="Code" publish="click~control/code"></button-oid>
27
+ <button-oid label="Clear" publish="click~control/clear"></button-oid>
28
+ <button-oid label="Download Code" publish="click~control/download/code"></button-oid>
29
+ <button-oid label="Download Page" publish="click~control/download/page"></button-oid>
30
+ </oid-sphere>
31
+ </h2>
32
+ </div>
33
+
34
+ <div style="height:100%">
35
+ <split-pane-oid>
36
+ <div style="width:100%;height:100%" slot="side-a">
37
+ <split-pane-oid split="vertical">
38
+ <div id="pg-tree" slot="side-a"
39
+ style="width:100%;height:100%;padding:5px;border-style:solid;border-width:1px">
40
+ <oid-sphere id="control">
41
+ <graph-oid layout="vh"
42
+ subscribe="tree/node~node/add;tree/edge~edge/add;tree/clear~graph/clear"></graph-oid>
43
+ </oid-sphere>
44
+ </div>
45
+ <textarea id="pg-editor" slot="side-b" class="code"
46
+ style="width:100%;height:100%"></textarea>
47
+ </split-pane-oid>
48
+ </div>
49
+ <div style="width:100%;height:100%" slot="side-b">
50
+ <split-pane-oid split="vertical" proportion="75%">
51
+ <div id="pg-render" slot="side-a"
52
+ style="width:100%;height:100%;padding:5px;border-style:solid;border-width:1px">
53
+ </div>
54
+ <div id="pg-bus" style="width:100%;height:100%" slot="side-b">
55
+ <oid-sphere id="control">
56
+ <console-oid class="code" prompt="" subscribe="control/monitor~display">
57
+ </console-oid>
58
+ </oid-sphere>
59
+ </div>
60
+ </split-pane-oid>
61
+ </div>
62
+ </split-pane-oid>
63
+ </div>
64
+ </div>
65
+ </body>
66
+ </html>
static/editor/js/editor-pg.js ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Sphere, Bus } from 'https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.0/full.js'
2
+ // import { Sphere, Bus } from '@mundorum/oid/oid.js'
3
+
4
+ // if (!new URL(document.location).searchParams.has('dev')) {
5
+ // await import('@mundorum/collections/full.js')
6
+ // }
7
+
8
+ export class EditorPg {
9
+ start () {
10
+ this._controlSphere = Sphere.get('control').bus
11
+ this._controlSphere.subscribe(
12
+ 'file/loaded', this._renderFile.bind(this))
13
+ this._controlSphere.subscribe(
14
+ 'control/download/code', this._downloadCode.bind(this))
15
+ this._controlSphere.subscribe(
16
+ 'control/download/page', this._downloadPage.bind(this))
17
+ this._controlSphere.subscribe(
18
+ 'control/render', this._renderOids.bind(this))
19
+ this._controlSphere.subscribe(
20
+ 'control/code', this._codeOids.bind(this))
21
+ this._controlSphere.subscribe(
22
+ 'control/clear', this._clearOids.bind(this))
23
+ Bus.i.subscribe('#', this._busMonitor.bind(this))
24
+ }
25
+
26
+ _renderFile (topic, message) {
27
+ this._template = message.value
28
+ document.querySelector("#pg-render").innerHTML = this._template
29
+ this._showTree()
30
+ }
31
+
32
+ _showTree () {
33
+ const root = document.querySelector("#pg-render")
34
+ this._controlSphere.publish('tree/clear')
35
+ document.querySelector("#oid-list").innerHTML =
36
+ '<option value="">Select an OID</option>'
37
+ for (let childId = 1; childId <= root.children.length; childId++)
38
+ this._buildTree(root.children[childId-1], null, childId)
39
+ }
40
+
41
+ _buildTree (element, parentId, childId) {
42
+ const id = (parentId != null) ? `${parentId}.${childId}` : `${childId}`
43
+ const name = element.nodeName.toLowerCase()
44
+
45
+ // node
46
+ const node = { id: id,
47
+ label: name + (element.id ? `: ${element.id}` : '') }
48
+ if (!name.endsWith('-oid'))
49
+ node.format = 'light'
50
+ this._controlSphere.publish('tree/node', node)
51
+ if (element.id) {
52
+ const option = document.createElement('option')
53
+ option.value = element.id
54
+ option.text = element.id
55
+ document.querySelector("#oid-list").appendChild(option)
56
+ }
57
+
58
+ // edge
59
+ if (parentId != null) {
60
+ const edge = { source: parentId,
61
+ target: id }
62
+ this._controlSphere.publish('tree/edge', edge)
63
+ }
64
+
65
+ for (let childId = 1; childId <= element.children.length; childId++)
66
+ this._buildTree(element.children[childId-1], id, childId)
67
+ }
68
+
69
+ _renderOids () {
70
+ const div = document.createElement('div')
71
+ div.innerHTML = document.querySelector("#pg-editor").value
72
+
73
+ const selectedOption = document.querySelector("#oid-list").value
74
+ let base = document.querySelector(
75
+ (selectedOption === '') ? '#pg-render' : `#${selectedOption}`)
76
+
77
+ if (base instanceof SVGElement) {
78
+ const foreignObject = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject')
79
+ foreignObject.setAttribute('width', '100%')
80
+ foreignObject.setAttribute('height', '100%')
81
+ base.appendChild(foreignObject)
82
+ base = foreignObject
83
+ }
84
+
85
+ while (div.firstChild)
86
+ base.appendChild(div.firstChild)
87
+
88
+ this._showTree()
89
+ }
90
+
91
+ _codeOids () {
92
+ const selectedOption = document.querySelector("#oid-list").value
93
+ const base = document.querySelector(
94
+ (selectedOption === '') ? '#pg-render' : `#${selectedOption}`)
95
+ document.querySelector("#pg-editor").value = base.innerHTML
96
+ }
97
+
98
+ _clearOids () {
99
+ document.querySelector("#pg-render").innerHTML =
100
+ (this._template != null) ? this._template : ''
101
+ this._showTree()
102
+ }
103
+
104
+ _busMonitor (topic, message) {
105
+ Sphere.get('control').bus.
106
+ publish('control/monitor', {value: `[${topic}] ${JSON.stringify(message)}`})
107
+ }
108
+
109
+ _downloadCode () {
110
+ this._download('code.html', document.querySelector('#pg-render').innerHTML)
111
+ }
112
+
113
+ _downloadPage () {
114
+ this._download('page.html',
115
+ EditorPg.pageBegin +
116
+ document.querySelector('#pg-render').innerHTML +
117
+ EditorPg.pageEnd)
118
+ }
119
+
120
+ _download (fileName, content) {
121
+ const a = document.createElement('a')
122
+ a.style.display = 'none'
123
+ document.body.appendChild(a)
124
+ a.href = window.URL.createObjectURL(
125
+ new Blob([content], {type: 'text/plain'}))
126
+ a.setAttribute('download', fileName)
127
+ a.click()
128
+ window.URL.revokeObjectURL(a.href)
129
+ document.body.removeChild(a)
130
+ }
131
+ }
132
+
133
+ EditorPg.i = new EditorPg()
134
+
135
+ EditorPg.pageBegin =
136
+ `<!DOCTYPE html>
137
+ <html>
138
+ <head>
139
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mundorum/oid/oid.min.css">
140
+ <script src="https://cdn.jsdelivr.net/npm/@mundorum/collections/full.min.js"></script>
141
+ </head>
142
+ <body>
143
+ <oid-sphere assets="https://mundorum.github.io/oid/oid/playground/assets/" stydefault="https://cdn.jsdelivr.net/npm/@mundorum/oid/oid.min.css" global></oid-sphere>`
144
+
145
+ EditorPg.pageEnd =
146
+ `</body>
147
+ </html>`
static/editor/js/editor-rest.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Oid } from 'https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.0/full.js'
2
+ // import { Oid } from '@mundorum/oid/oid.js'
3
+
4
+ Oid.customize('oid:rest', {
5
+ cid: 'cancer-predictor',
6
+ api: {
7
+ oas: {
8
+ paths: {
9
+ 'http://127.0.0.1:8000/train?train_path={train_path}&test_path={test_path}': {
10
+ 'post': {
11
+ operationId: 'train',
12
+ parameters: [
13
+ {name: 'train_path',
14
+ in: 'path'
15
+ },
16
+ {name: 'test_path',
17
+ in: 'path'
18
+ }
19
+ ]
20
+ }
21
+ },
22
+ 'http://127.0.0.1:8000/predict?radius_mean={radius_mean}&texture_mean={texture_mean}&symmetry_mean={symmetry_mean}&fractal_dimension_mean={fractal_dimension_mean}': {
23
+ 'get': {
24
+ operationId: 'predict',
25
+ parameters: [
26
+ {name: 'radius_mean',
27
+ in: 'path'
28
+ },
29
+ {name: 'texture_mean',
30
+ in: 'path'
31
+ },
32
+ {name: 'symmetry_mean',
33
+ in: 'path'
34
+ },
35
+ {name: 'fractal_dimension_mean',
36
+ in: 'path'
37
+ }
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ })
45
+
46
+ Oid.customize('oid:rest', {
47
+ cid: 'factory-predictor',
48
+ api: {
49
+ oas: {
50
+ paths: {
51
+ 'http://127.0.0.1:8000/train': {
52
+ 'post': {
53
+ operationId: 'train'
54
+ }
55
+ },
56
+ 'http://127.0.0.1:8000/inform_temperature?value={value}': {
57
+ 'post': {
58
+ operationId: 'temperature',
59
+ parameters: [
60
+ {name: 'value',
61
+ in: 'path'
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ 'http://127.0.0.1:8000/inform_pressure?value={value}': {
67
+ 'post': {
68
+ operationId: 'pressure',
69
+ parameters: [
70
+ {name: 'value',
71
+ in: 'path'
72
+ }
73
+ ]
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ })
static/gallery/factory-ai.html ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div style="width: 100%; height: 60%; background-color: lightgrey; text-align: center">
2
+ <div style="font-size:larger;font-weight: bold">Factory</div>
3
+ <span id="engine" style="width: 45%; display: inline-block; vertical-align: middle">
4
+ <image-oid source="assets:images/di-pietro-engine.gif" publish="mouseleave~thermo/low;mouseenter~thermo/medium;click~thermo/high/alert">
5
+ </image-oid>
6
+ </span>
7
+ <span id="cooler" style="width: 45%; display: inline-block; vertical-align: middle">
8
+ <state-pane-oid initial="off" subscribe="predictor/train~last">
9
+ <image-oid id="off" source="assets:images/evaporative-cooling.png"></image-oid>
10
+ <image-oid id="on" source="assets:images/evaporative-cooling.gif"></image-oid>
11
+ </state-pane-oid>
12
+ </span>
13
+ </div>
14
+ <div style="width: 100%; height: 35%; background-color: grey; text-align: center">
15
+ <div style="font-size: larger; font-weight: bold;">Control Panel</div>
16
+ <span id="alert" style="width: 20%; display: inline-block; vertical-align: middle">
17
+ <state-pane-oid initial="N" subscribe="update/alert~state">
18
+ <image-oid id="N" source="assets:images/light-green.svg"></image-oid>
19
+ <image-oid id="P" source="assets:images/light-red.svg"></image-oid>
20
+ </state-pane-oid>
21
+ </span>
22
+ <span id="train" style="width: 20%; display: inline-block; vertical-align: middle">
23
+ <switch-oid publish="on~predictor/train">
24
+ </switch-oid>
25
+ </span>
26
+ <span id="temperature" style="width: 20%; display: inline-block; vertical-align: middle">
27
+ <div style="font-size: larger; font-weight: bold;">Temperature</div>
28
+ <slider-oid min="40" max="120" value="40" index publish="change~predictor/temperature">
29
+ </slider-oid>
30
+ </span>
31
+ <span id="pressure" style="width: 20%; display: inline-block; vertical-align: middle">
32
+ <div style="font-size: larger; font-weight: bold;">Pressure</div>
33
+ <slider-oid min="40" max="200" value="40" index publish="change~predictor/pressure">
34
+ </slider-oid>
35
+ </span>
36
+ <rest-oid custom="factory-predictor"
37
+ subscribe="predictor/train~post/train;predictor/temperature~post/temperature;predictor/pressure~post/pressure"
38
+ publish="dispatch~update/alert">
39
+ </rest-oid>
40
+ </div>
test.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ temperature,pressure,diagnosis
2
+ 70,145,N
3
+ 88,162,N
4
+ 83,158,N
5
+ 97,47,P
6
+ 53,188,P
7
+ 45,200,P
8
+ 105,35,P
9
+ 65,140,N
10
+ 102,42,P
11
+ 58,182,P
train.csv ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ temperature,pressure,diagnosis
2
+ 75,150,N
3
+ 80,155,N
4
+ 72,148,N
5
+ 85,160,N
6
+ 78,152,N
7
+ 90,165,N
8
+ 95,50,P
9
+ 100,45,P
10
+ 85,40,P
11
+ 92,48,P
12
+ 98,52,P
13
+ 50,180,P
14
+ 55,190,P
15
+ 48,195,P
16
+ 60,185,P
17
+ 52,192,P