Spaces:
Runtime error
Runtime error
asdads
Browse files25 unmodified lines26272829303132333435363738393 unmodified lines43444546474849505152535455565758596061626325 unmodified linesclass ImageLoad:def __init__(self, path:str) -> None:self.path = pathself.image_name = path[path.rfind('/') + 1:]print(self.image_name)def __call__(self):project = hopsworks.login()dataset_api = project.get_dataset_api()dataset_api.download(self.path, overwrite=True)return Image.open(self.image_name)3 unmodified lineswith gr.Row():with gr.Column():gr.Label("Today's Predicted Image")input_img = gr.Image(value=ImageLoad("Resources/images/latest_wine.png"), elem_id="predicted-img")with gr.Column():gr.Label("Today's Actual Image")input_img = gr.Image(value=ImageLoad("Resources/images/actual_wine.png"), elem_id="actual-img")with gr.Row():with gr.Column():gr.Label("Recent Prediction History")input_img = gr.Image(value=ImageLoad("Resources/images/df_wine_recent.png"), elem_id="recent-predictions")with gr.Column():gr.Label("Confusion Maxtrix with Historical Prediction Performance")#input_img = gr.Image("wine_confusion_matrix.png", elem_id="confusion-matrix")""" image = gr.Image(show_label=False)demo.load(fn=load_images, inputs=None, outputs=image,show_progress=False) """input_img = gr.Image(value=ImageLoad("Resources/images/wine_confusion_matrix.png"), elem_id="recent-predictions")#demo.load(load_images)#load_images()25 unmodified lines2627282930313233343536373839403 unmodified lines44454647484950515253545556575859606162636425 unmodified linesclass ImageLoad:def __init__(self, path, project) -> None:self.path = pathself.image_name = path[path.rfind('/') + 1:]self.project = projectprint(self.image_name)def __call__(self):#project = hopsworks.login()dataset_api = self.project.get_dataset_api()dataset_api.download(self.path, overwrite=True)return Image.open(self.image_name)3 unmodified lineswith gr.Row():with gr.Column():gr.Label("Today's Predicted Image")input_img = gr.Image(value=ImageLoad("Resources/images/latest_wine.png", project), elem_id="predicted-img")with gr.Column():gr.Label("Today's Actual Image")input_img = gr.Image(value=ImageLoad("Resources/images/actual_wine.png", project), elem_id="actual-img")with gr.Row():with gr.Column():gr.Label("Recent Prediction History")input_img = gr.Image(value=ImageLoad("Resources/images/df_wine_recent.png", project), elem_id="recent-predictions")with gr.Column():gr.Label("Confusion Maxtrix with Historical Prediction Performance")#input_img = gr.Image("wine_confusion_matrix.png", elem_id="confusion-matrix")""" image = gr.Image(show_label=False)demo.load(fn=load_images, inputs=None, outputs=image,show_progress=False) """input_img = gr.Image(value=ImageLoad("Resources/images/wine_confusion_matrix.png", project), elem_id="recent-predictions")#demo.load(load_images)#load_images()
app.py+8-7