format
All checks were successful
Security Scan / security (pull_request) Successful in 37s
Security Scan / dependency-check (pull_request) Successful in 39s
Test Suite / lint (pull_request) Successful in 31s
Test Suite / test (3.11) (pull_request) Successful in 1m34s
Test Suite / build (pull_request) Successful in 39s
All checks were successful
Security Scan / security (pull_request) Successful in 37s
Security Scan / dependency-check (pull_request) Successful in 39s
Test Suite / lint (pull_request) Successful in 31s
Test Suite / test (3.11) (pull_request) Successful in 1m34s
Test Suite / build (pull_request) Successful in 39s
This commit is contained in:
@@ -18,9 +18,9 @@ def create_app():
|
|||||||
__name__,
|
__name__,
|
||||||
external_stylesheets=[
|
external_stylesheets=[
|
||||||
dbc.themes.BOOTSTRAP,
|
dbc.themes.BOOTSTRAP,
|
||||||
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
|
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css",
|
||||||
],
|
],
|
||||||
assets_folder=assets_path
|
assets_folder=assets_path,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Allow callbacks to components that are dynamically created in tabs
|
# Allow callbacks to components that are dynamically created in tabs
|
||||||
|
@@ -20,4 +20,3 @@ class InteractionCallbacks:
|
|||||||
return dash.no_update, dash.no_update
|
return dash.no_update, dash.no_update
|
||||||
|
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
@@ -208,7 +208,6 @@ class DataSourceComponent:
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _create_opensearch_section(self, section_type):
|
def _create_opensearch_section(self, section_type):
|
||||||
"""Create a complete OpenSearch section for either 'data' or 'prompts'."""
|
"""Create a complete OpenSearch section for either 'data' or 'prompts'."""
|
||||||
section_id = section_type # 'data' or 'prompts'
|
section_id = section_type # 'data' or 'prompts'
|
||||||
|
@@ -87,15 +87,17 @@ class SidebarComponent:
|
|||||||
[
|
[
|
||||||
self.textinput_component.create_text_input_interface(),
|
self.textinput_component.create_text_input_interface(),
|
||||||
],
|
],
|
||||||
title=html.Span([
|
title=html.Span(
|
||||||
"Generate Embeddings ",
|
[
|
||||||
html.I(
|
"Generate Embeddings ",
|
||||||
className="fas fa-info-circle text-muted",
|
html.I(
|
||||||
style={"cursor": "pointer"},
|
className="fas fa-info-circle text-muted",
|
||||||
id="generate-embeddings-info-icon",
|
style={"cursor": "pointer"},
|
||||||
title="Create new embeddings from text input using various in-browser models"
|
id="generate-embeddings-info-icon",
|
||||||
)
|
title="Create new embeddings from text input using various in-browser models",
|
||||||
]),
|
),
|
||||||
|
]
|
||||||
|
),
|
||||||
item_id="generate-embeddings-accordion",
|
item_id="generate-embeddings-accordion",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -106,15 +108,17 @@ class SidebarComponent:
|
|||||||
self.datasource_component.create_success_alert(),
|
self.datasource_component.create_success_alert(),
|
||||||
self.datasource_component.create_tabbed_interface(),
|
self.datasource_component.create_tabbed_interface(),
|
||||||
],
|
],
|
||||||
title=html.Span([
|
title=html.Span(
|
||||||
"Load Embeddings ",
|
[
|
||||||
html.I(
|
"Load Embeddings ",
|
||||||
className="fas fa-info-circle text-muted",
|
html.I(
|
||||||
style={"cursor": "pointer"},
|
className="fas fa-info-circle text-muted",
|
||||||
id="load-embeddings-info-icon",
|
style={"cursor": "pointer"},
|
||||||
title="Load existing embeddings: upload files or read from OpenSearch"
|
id="load-embeddings-info-icon",
|
||||||
)
|
title="Load existing embeddings: upload files or read from OpenSearch",
|
||||||
]),
|
),
|
||||||
|
]
|
||||||
|
),
|
||||||
item_id="data-sources-accordion",
|
item_id="data-sources-accordion",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -124,14 +128,16 @@ class SidebarComponent:
|
|||||||
+ self._create_color_dropdown()
|
+ self._create_color_dropdown()
|
||||||
+ self._create_dimension_toggle()
|
+ self._create_dimension_toggle()
|
||||||
+ self._create_prompts_toggle(),
|
+ self._create_prompts_toggle(),
|
||||||
title=html.Span([
|
title=html.Span(
|
||||||
"Visualization Controls ",
|
[
|
||||||
html.I(
|
"Visualization Controls ",
|
||||||
className="fas fa-info-circle text-muted",
|
html.I(
|
||||||
style={"cursor": "pointer"},
|
className="fas fa-info-circle text-muted",
|
||||||
id="visualization-controls-info-icon",
|
style={"cursor": "pointer"},
|
||||||
title="Configure plot settings: select dimensionality reduction method, colors, and display options"
|
id="visualization-controls-info-icon",
|
||||||
)
|
title="Configure plot settings: select dimensionality reduction method, colors, and display options",
|
||||||
]),
|
),
|
||||||
|
]
|
||||||
|
),
|
||||||
item_id="visualization-controls-accordion",
|
item_id="visualization-controls-accordion",
|
||||||
)
|
)
|
||||||
|
@@ -294,7 +294,6 @@ class TextInputComponent:
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def _create_status_section(self):
|
def _create_status_section(self):
|
||||||
"""Create status alerts and results preview."""
|
"""Create status alerts and results preview."""
|
||||||
return html.Div(
|
return html.Div(
|
||||||
|
@@ -5,68 +5,76 @@ import dash_bootstrap_components as dbc
|
|||||||
class UploadComponent:
|
class UploadComponent:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_data_upload():
|
def create_data_upload():
|
||||||
return html.Div([
|
return html.Div(
|
||||||
dcc.Upload(
|
[
|
||||||
id="upload-data",
|
dcc.Upload(
|
||||||
children=html.Div([
|
id="upload-data",
|
||||||
"Upload Data ",
|
children=html.Div(
|
||||||
html.I(
|
[
|
||||||
className="fas fa-info-circle",
|
"Upload Data ",
|
||||||
style={"color": "#6c757d", "fontSize": "14px"},
|
html.I(
|
||||||
id="data-upload-info"
|
className="fas fa-info-circle",
|
||||||
)
|
style={"color": "#6c757d", "fontSize": "14px"},
|
||||||
]),
|
id="data-upload-info",
|
||||||
style={
|
),
|
||||||
"width": "100%",
|
]
|
||||||
"height": "60px",
|
),
|
||||||
"lineHeight": "60px",
|
style={
|
||||||
"borderWidth": "1px",
|
"width": "100%",
|
||||||
"borderStyle": "dashed",
|
"height": "60px",
|
||||||
"borderRadius": "5px",
|
"lineHeight": "60px",
|
||||||
"textAlign": "center",
|
"borderWidth": "1px",
|
||||||
"margin-bottom": "20px",
|
"borderStyle": "dashed",
|
||||||
},
|
"borderRadius": "5px",
|
||||||
multiple=False,
|
"textAlign": "center",
|
||||||
),
|
"margin-bottom": "20px",
|
||||||
dbc.Tooltip(
|
},
|
||||||
"Click here or drag and drop NDJSON files containing document embeddings",
|
multiple=False,
|
||||||
target="data-upload-info",
|
),
|
||||||
placement="top"
|
dbc.Tooltip(
|
||||||
)
|
"Click here or drag and drop NDJSON files containing document embeddings",
|
||||||
])
|
target="data-upload-info",
|
||||||
|
placement="top",
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_prompts_upload():
|
def create_prompts_upload():
|
||||||
return html.Div([
|
return html.Div(
|
||||||
dcc.Upload(
|
[
|
||||||
id="upload-prompts",
|
dcc.Upload(
|
||||||
children=html.Div([
|
id="upload-prompts",
|
||||||
"Upload Prompts ",
|
children=html.Div(
|
||||||
html.I(
|
[
|
||||||
className="fas fa-info-circle",
|
"Upload Prompts ",
|
||||||
style={"color": "#6c757d", "fontSize": "14px"},
|
html.I(
|
||||||
id="prompts-upload-info"
|
className="fas fa-info-circle",
|
||||||
)
|
style={"color": "#6c757d", "fontSize": "14px"},
|
||||||
]),
|
id="prompts-upload-info",
|
||||||
style={
|
),
|
||||||
"width": "100%",
|
]
|
||||||
"height": "60px",
|
),
|
||||||
"lineHeight": "60px",
|
style={
|
||||||
"borderWidth": "1px",
|
"width": "100%",
|
||||||
"borderStyle": "dashed",
|
"height": "60px",
|
||||||
"borderRadius": "5px",
|
"lineHeight": "60px",
|
||||||
"textAlign": "center",
|
"borderWidth": "1px",
|
||||||
"margin-bottom": "20px",
|
"borderStyle": "dashed",
|
||||||
"borderColor": "#28a745",
|
"borderRadius": "5px",
|
||||||
},
|
"textAlign": "center",
|
||||||
multiple=False,
|
"margin-bottom": "20px",
|
||||||
),
|
"borderColor": "#28a745",
|
||||||
dbc.Tooltip(
|
},
|
||||||
"Click here or drag and drop NDJSON files containing prompt embeddings",
|
multiple=False,
|
||||||
target="prompts-upload-info",
|
),
|
||||||
placement="top"
|
dbc.Tooltip(
|
||||||
)
|
"Click here or drag and drop NDJSON files containing prompt embeddings",
|
||||||
])
|
target="prompts-upload-info",
|
||||||
|
placement="top",
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_reset_button():
|
def create_reset_button():
|
||||||
|
Reference in New Issue
Block a user