Maria Halvarsson commited on
Commit
f1cfd3b
·
1 Parent(s): 0fba949
Files changed (3) hide show
  1. README.md +5 -5
  2. app.py +33 -0
  3. requirements.txt +3 -0
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
- title: Iris Monitor
3
- emoji: 🔥
4
- colorFrom: gray
5
- colorTo: blue
6
  sdk: gradio
7
- sdk_version: 4.4.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
1
  ---
2
+ title: Iris Monitoring
3
+ emoji: 💻
4
+ colorFrom: blue
5
+ colorTo: pink
6
  sdk: gradio
7
+ sdk_version: 3.14.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
app.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from PIL import Image
3
+ import hopsworks
4
+ import os
5
+
6
+
7
+ project = hopsworks.login()
8
+ fs = project.get_feature_store()
9
+
10
+ dataset_api = project.get_dataset_api()
11
+
12
+ dataset_api.download("Resources/images/latest_iris.png")
13
+ dataset_api.download("Resources/images/actual_iris.png")
14
+ dataset_api.download("Resources/images/df_recent.png")
15
+ dataset_api.download("Resources/images/confusion_matrix.png")
16
+
17
+ with gr.Blocks() as demo:
18
+ with gr.Row():
19
+ with gr.Column():
20
+ gr.Label("Today's Predicted Image")
21
+ input_img = gr.Image("latest_iris.png", elem_id="predicted-img")
22
+ with gr.Column():
23
+ gr.Label("Today's Actual Image")
24
+ input_img = gr.Image("actual_iris.png", elem_id="actual-img")
25
+ with gr.Row():
26
+ with gr.Column():
27
+ gr.Label("Recent Prediction History")
28
+ input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
29
+ with gr.Column():
30
+ gr.Label("Confusion Maxtrix with Historical Prediction Performance")
31
+ input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
32
+
33
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ hopsworks
2
+ joblib
3
+ scikit-learn==1.1.1