Viju Sudhi
commited on
Commit
·
ef0d76e
1
Parent(s):
83ed156
refactor: updated ui
Browse files- .gitignore +2 -0
- src/ui/explainer_ui.py +2 -8
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
**__pycache__
|
| 2 |
+
.idea
|
src/ui/explainer_ui.py
CHANGED
|
@@ -76,14 +76,9 @@ class MockExplainerUI:
|
|
| 76 |
def run(
|
| 77 |
self,
|
| 78 |
user_input: str,
|
| 79 |
-
granularity: ExplanationGranularity,
|
| 80 |
upper_percentile: str,
|
| 81 |
middle_percentile: str,
|
| 82 |
-
lower_percentile: str
|
| 83 |
-
explainer_name: str,
|
| 84 |
-
model_name: str,
|
| 85 |
-
perturber_name: str,
|
| 86 |
-
comparator_name: str,
|
| 87 |
):
|
| 88 |
print(user_input)
|
| 89 |
with open(
|
|
@@ -113,7 +108,7 @@ class MockExplainerUI:
|
|
| 113 |
value=self.__logo_path,
|
| 114 |
width=50,
|
| 115 |
height=50,
|
| 116 |
-
|
| 117 |
container=False,
|
| 118 |
)
|
| 119 |
with gr.Column(scale=2):
|
|
@@ -222,7 +217,6 @@ class MockExplainerUI:
|
|
| 222 |
def __visualize_explanations(
|
| 223 |
self,
|
| 224 |
user_input: str,
|
| 225 |
-
system_response: Optional[str],
|
| 226 |
generator_explanations: ExplanationDto,
|
| 227 |
upper_percentile: Optional[int],
|
| 228 |
middle_percentile: Optional[int],
|
|
|
|
| 76 |
def run(
|
| 77 |
self,
|
| 78 |
user_input: str,
|
|
|
|
| 79 |
upper_percentile: str,
|
| 80 |
middle_percentile: str,
|
| 81 |
+
lower_percentile: str
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
):
|
| 83 |
print(user_input)
|
| 84 |
with open(
|
|
|
|
| 108 |
value=self.__logo_path,
|
| 109 |
width=50,
|
| 110 |
height=50,
|
| 111 |
+
show_share_button=False,
|
| 112 |
container=False,
|
| 113 |
)
|
| 114 |
with gr.Column(scale=2):
|
|
|
|
| 217 |
def __visualize_explanations(
|
| 218 |
self,
|
| 219 |
user_input: str,
|
|
|
|
| 220 |
generator_explanations: ExplanationDto,
|
| 221 |
upper_percentile: Optional[int],
|
| 222 |
middle_percentile: Optional[int],
|