Spaces:
Sleeping
Sleeping
dcavadia commited on
Commit ·
bf08742
1
Parent(s): cebf037
update examples
Browse files- src/config/settings.py +1 -1
- src/ui/components.py +10 -3
src/config/settings.py
CHANGED
|
@@ -27,7 +27,7 @@ class UIConfig:
|
|
| 27 |
TEXTBOX_LINES: int = 4
|
| 28 |
LEFT_COLUMN_SCALE: int = 5
|
| 29 |
RIGHT_COLUMN_SCALE: int = 5
|
| 30 |
-
THEME_TOGGLE_MIN_WIDTH: int = 140
|
| 31 |
|
| 32 |
class AppConfig:
|
| 33 |
"""Application metadata."""
|
|
|
|
| 27 |
TEXTBOX_LINES: int = 4
|
| 28 |
LEFT_COLUMN_SCALE: int = 5
|
| 29 |
RIGHT_COLUMN_SCALE: int = 5
|
| 30 |
+
THEME_TOGGLE_MIN_WIDTH: int = 140
|
| 31 |
|
| 32 |
class AppConfig:
|
| 33 |
"""Application metadata."""
|
src/ui/components.py
CHANGED
|
@@ -64,13 +64,18 @@ class MelanoScopeUI:
|
|
| 64 |
def _create_examples_section(self) -> None:
|
| 65 |
"""Create examples section if files exist."""
|
| 66 |
example_files = [
|
| 67 |
-
"
|
| 68 |
-
"examples/melanoma.jpg", "examples/nevus.jpg"
|
| 69 |
]
|
| 70 |
|
| 71 |
existing_examples = [f for f in example_files if os.path.exists(f)]
|
| 72 |
if existing_examples:
|
| 73 |
-
gr.Examples(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
def _create_results_column(self) -> None:
|
| 76 |
"""Create results column with predictions and info."""
|
|
@@ -139,3 +144,5 @@ class MelanoScopeUI:
|
|
| 139 |
"""Clear all inputs and outputs."""
|
| 140 |
empty_df = create_empty_dataframe(self.classes)
|
| 141 |
return (None, "", "", "", "", "", "", empty_df, "")
|
|
|
|
|
|
|
|
|
| 64 |
def _create_examples_section(self) -> None:
|
| 65 |
"""Create examples section if files exist."""
|
| 66 |
example_files = [
|
| 67 |
+
"melanoma.jpg", "vascular_lesion.jpg"
|
|
|
|
| 68 |
]
|
| 69 |
|
| 70 |
existing_examples = [f for f in example_files if os.path.exists(f)]
|
| 71 |
if existing_examples:
|
| 72 |
+
gr.Examples(
|
| 73 |
+
examples=existing_examples,
|
| 74 |
+
inputs=self.image_input,
|
| 75 |
+
label="Quick Examples",
|
| 76 |
+
cache_examples=False
|
| 77 |
+
)
|
| 78 |
+
|
| 79 |
|
| 80 |
def _create_results_column(self) -> None:
|
| 81 |
"""Create results column with predictions and info."""
|
|
|
|
| 144 |
"""Clear all inputs and outputs."""
|
| 145 |
empty_df = create_empty_dataframe(self.classes)
|
| 146 |
return (None, "", "", "", "", "", "", empty_df, "")
|
| 147 |
+
|
| 148 |
+
|