WayneLinn commited on
Commit
cae3506
1 Parent(s): 30570d3

changed latest_state.png to latest_passenger.png

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -9,19 +9,19 @@ project = hopsworks.login(project="test42",api_key_value=os.environ.get("HOPSWOR
9
  fs = project.get_feature_store()
10
 
11
  dataset_api = project.get_dataset_api()
12
- dataset_api.download("Resources/images/latest_state.png",overwrite=True)
13
  dataset_api.download("Resources/images/actual_state.png",overwrite=True)
14
  dataset_api.download("Resources/images/df_recent_state.png",overwrite=True)
15
  dataset_api.download("Resources/images/titanic_confusion_matrix.png",overwrite=True)
16
- x=0
17
  def update():
18
- dataset_api.download("Resources/images/latest_state.png",overwrite=True)
19
  dataset_api.download("Resources/images/actual_state.png",overwrite=True)
20
  dataset_api.download("Resources/images/df_recent_state.png",overwrite=True)
21
  dataset_api.download("Resources/images/titanic_confusion_matrix.png",overwrite=True)
22
 
23
- def update_latest_state_img():
24
- im = iio.imread('latest_state.png')
25
  return im
26
 
27
  def update_actual_state_img():
@@ -47,8 +47,8 @@ with gr.Blocks() as demo:
47
  with gr.Row():
48
  with gr.Column():
49
  gr.Label("Today's Predicted Image")
50
- input_img = gr.Image("latest_state.png", elem_id="predicted-img")
51
- refresh.click(update_latest_state_img,outputs=input_img)
52
 
53
  with gr.Column():
54
  gr.Label("Today's Actual Image")
 
9
  fs = project.get_feature_store()
10
 
11
  dataset_api = project.get_dataset_api()
12
+ dataset_api.download("Resources/images/latest_passenger.png",overwrite=True)
13
  dataset_api.download("Resources/images/actual_state.png",overwrite=True)
14
  dataset_api.download("Resources/images/df_recent_state.png",overwrite=True)
15
  dataset_api.download("Resources/images/titanic_confusion_matrix.png",overwrite=True)
16
+
17
  def update():
18
+ dataset_api.download("Resources/images/latest_passenger.png",overwrite=True)
19
  dataset_api.download("Resources/images/actual_state.png",overwrite=True)
20
  dataset_api.download("Resources/images/df_recent_state.png",overwrite=True)
21
  dataset_api.download("Resources/images/titanic_confusion_matrix.png",overwrite=True)
22
 
23
+ def update_latest_passenger_img():
24
+ im = iio.imread('latest_passenger.png')
25
  return im
26
 
27
  def update_actual_state_img():
 
47
  with gr.Row():
48
  with gr.Column():
49
  gr.Label("Today's Predicted Image")
50
+ input_img = gr.Image("latest_passenger.png", elem_id="predicted-img")
51
+ refresh.click(update_latest_passenger_img,outputs=input_img)
52
 
53
  with gr.Column():
54
  gr.Label("Today's Actual Image")