Skip to content

Commit

Permalink
Merge pull request #118 from 1chooo/ho-dev
Browse files Browse the repository at this point in the history
fix: Classifier playground
  • Loading branch information
1chooo authored Sep 11, 2023
2 parents 4787703 + 47497e9 commit b2d692b
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 25 deletions.
1 change: 0 additions & 1 deletion Refinaid/App/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from fastapi.responses import HTMLResponse, FileResponse
from fastapi.staticfiles import StaticFiles
from Refinaid.Playground.Classifier.Launch import build_ui
from Refinaid.gui.Launch import build_ui
from fastapi import Form, Depends, HTTPException
import gradio as gr

Expand Down
4 changes: 2 additions & 2 deletions Refinaid/Playground/Classifier/Dashborad/Header.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
'''
Create Date: 2023/09/11
Author: @1chooo(Hugo ChunHo Lin)
Version: v0.1.2
Version: v0.1.4
'''

import gradio as gr
from Refinaid.gui.Information import PageContent
from Refinaid.Playground.Classifier.Information import PageContent
from typing import Any

class PageHeader:
Expand Down
24 changes: 16 additions & 8 deletions Refinaid/Playground/Classifier/Dashborad/Preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
'''
Create Date: 2023/09/11
Author: @1chooo(Hugo ChunHo Lin)
Version: v0.1.2
Version: v0.1.4
'''

import gradio as gr
from Refinaid.gui.Information import PageContent
from Refinaid.Playground.Classifier.Information import PageContent
from typing import Any, Tuple
from Refinaid.Action.Load import get_dataframe

Expand Down Expand Up @@ -67,7 +67,10 @@ def get_select_mutiple_parameters_info(
)

def get_missing_values_handling_info(
self, *args: Any, **kwargs: Any) -> Tuple[
self,
*args: Any,
**kwargs: Any,
) -> Tuple[
gr.Markdown,
gr.Radio
]:
Expand All @@ -90,7 +93,8 @@ def get_missing_values_handling_info(
)

def get_data_scale_info(
self, *args: Any, **kwargs: Any) -> Tuple[
self, *args: Any, **kwargs: Any
) -> Tuple[
gr.Markdown,
gr.Radio
]:
Expand All @@ -115,7 +119,8 @@ def get_data_scale_info(
)

def get_data_split_info(
self, *args: Any, **kwargs: Any) -> Tuple[
self, *args: Any, **kwargs: Any
) -> Tuple[
gr.Markdown,
gr.Slider,
gr.Slider,
Expand Down Expand Up @@ -158,7 +163,8 @@ def get_data_split_info(
)

def get_submit_dataset_setting_btn(
self, *args: Any, **kwargs: Any) -> Tuple[
self, *args: Any, **kwargs: Any
) -> Tuple[
gr.Button
]:

Expand All @@ -171,7 +177,8 @@ def get_submit_dataset_setting_btn(
)

def get_preprocessing_visulize_info(
self, *args: Any, **kwargs: Any) -> Tuple[
self, *args: Any, **kwargs: Any
) -> Tuple[
gr.Markdown, gr.ScatterPlot
]:

Expand All @@ -196,7 +203,8 @@ def get_preprocessing_visulize_info(
)

def get_preprocessing_visualize_axis_info(
self, *args: Any, **kwargs: Any) -> Tuple[
self, *args: Any, **kwargs: Any
) -> Tuple[
gr.Dropdown, gr.Dropdown
]:
x_axis_dropdown = gr.Dropdown(
Expand Down
4 changes: 2 additions & 2 deletions Refinaid/Playground/Classifier/Dashborad/Training.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
'''
Create Date: 2023/09/11
Author: @1chooo(Hugo ChunHo Lin)
Version: v0.1.2
Version: v0.1.4
'''

import gradio as gr
from Refinaid.gui.Information import PageContent
from Refinaid.Playground.Classifier.Information import PageContent
from typing import Any, Tuple

class TrainingComponent:
Expand Down
4 changes: 2 additions & 2 deletions Refinaid/Playground/Classifier/Dashborad/TrainingHistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
'''
Create Date: 2023/09/11
Author: @1chooo(Hugo ChunHo Lin)
Version: v0.1.2
Version: v0.1.4
'''

import gradio as gr
from Refinaid.gui.Information import PageContent
from Refinaid.Playground.Classifier.Information import PageContent
from typing import Any, Tuple

class TrainingHistoryComponent:
Expand Down
2 changes: 1 addition & 1 deletion Refinaid/Playground/Classifier/Example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'''
Create Date: 2023/09/11
Author: @1chooo(Hugo ChunHo Lin)
Version: v0.1.2
Version: v0.1.4
'''

import gradio as gr
Expand Down
15 changes: 7 additions & 8 deletions Refinaid/Playground/Classifier/Launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
'''
Create Date: 2023/09/11
Author: @1chooo(Hugo ChunHo Lin)
Version: v0.1.2
Version: v0.1.4
'''

import os
import gradio as gr
from Refinaid.Utils.Listener import background_listener
from Refinaid.gui.Information import PageContent
from Refinaid.gui.Dashborad.Header import PageHeader
from Refinaid.gui.Dashborad.Preprocessing import PreprocessingComponent
from Refinaid.gui.Dashborad.Training import TrainingComponent
from Refinaid.gui.Dashborad.TrainingHistory import TrainingHistoryComponent
from Refinaid.gui.Example import PreprocessingExample
from Refinaid.Playground.Classifier.Information import PageContent
from Refinaid.Playground.Classifier.Dashborad.Header import PageHeader
from Refinaid.Playground.Classifier.Dashborad.Preprocessing import PreprocessingComponent
from Refinaid.Playground.Classifier.Dashborad.Training import TrainingComponent
from Refinaid.Playground.Classifier.Dashborad.TrainingHistory import TrainingHistoryComponent
from Refinaid.Playground.Classifier.Example import PreprocessingExample
from typing import Any

def build_ui(*args: Any, **kwargs: Any) -> gr.Blocks:
Expand Down
2 changes: 1 addition & 1 deletion Refinaid/Utils/Listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def background_listener(
train_img3,
training_history,
preprocessing_visulize_scatter_plot,
) -> None:
) -> None:
selected_dataset_name.change(
fn=update_parameters,
inputs=selected_dataset_name,
Expand Down

0 comments on commit b2d692b

Please sign in to comment.