Skip to content

Commit

Permalink
added prediction to app
Browse files Browse the repository at this point in the history
  • Loading branch information
chabazite committed Nov 28, 2023
1 parent f1d5dc3 commit 36ef1d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/webapp/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ws.onmessage = (event) => {
document.getElementById('humidity').textContent = data.humidity;
document.getElementById('temperature').textContent = data.temperature.toFixed(2);
document.getElementById('datetime').textContent = data.datetime;
document.getElementById('prediction').textContent = data.prediction.toFixed(2);
} catch (error) {
console.error('Error parsing WebSocket data:', error);
}
Expand Down
1 change: 1 addition & 0 deletions src/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ <h1>Real-Time IoT Data</h1>
<p>Humidity: <span id="humidity">-</span></p>
<p>Temperature: <span id="temperature">-</span></p>
<p>Datetime: <span id="datetime">-</span></p>
<p>Max Temp in the next 30 Minutes: <span id="prediction">-</span></p>
</div>

<!-- Link to the JavaScript file -->
Expand Down

0 comments on commit 36ef1d7

Please sign in to comment.