Spaces:
Running
Running
Commit
·
c0c37aa
1
Parent(s):
47ae43e
After PR review
Browse files- actions.py +1 -1
- app.py +1 -1
- components.py +11 -6
actions.py
CHANGED
|
@@ -14,7 +14,7 @@ from vizro.models.types import capture
|
|
| 14 |
from vizro_ai import VizroAI
|
| 15 |
|
| 16 |
logger = logging.getLogger(__name__)
|
| 17 |
-
logger.setLevel(logging.INFO)
|
| 18 |
|
| 19 |
SUPPORTED_VENDORS = {"OpenAI": ChatOpenAI}
|
| 20 |
|
|
|
|
| 14 |
from vizro_ai import VizroAI
|
| 15 |
|
| 16 |
logger = logging.getLogger(__name__)
|
| 17 |
+
logger.setLevel(logging.INFO) # TODO: remove manual setting and make centrally controlled
|
| 18 |
|
| 19 |
SUPPORTED_VENDORS = {"OpenAI": ChatOpenAI}
|
| 20 |
|
app.py
CHANGED
|
@@ -11,12 +11,12 @@ from components import (
|
|
| 11 |
CodeClipboard,
|
| 12 |
CustomDashboard,
|
| 13 |
Icon,
|
|
|
|
| 14 |
MyDropdown,
|
| 15 |
MyPage,
|
| 16 |
OffCanvas,
|
| 17 |
UserPromptTextArea,
|
| 18 |
UserUpload,
|
| 19 |
-
Modal
|
| 20 |
)
|
| 21 |
from dash import Input, Output, State, callback, get_asset_url, html
|
| 22 |
from dash.exceptions import PreventUpdate
|
|
|
|
| 11 |
CodeClipboard,
|
| 12 |
CustomDashboard,
|
| 13 |
Icon,
|
| 14 |
+
Modal,
|
| 15 |
MyDropdown,
|
| 16 |
MyPage,
|
| 17 |
OffCanvas,
|
| 18 |
UserPromptTextArea,
|
| 19 |
UserUpload,
|
|
|
|
| 20 |
)
|
| 21 |
from dash import Input, Output, State, callback, get_asset_url, html
|
| 22 |
from dash.exceptions import PreventUpdate
|
components.py
CHANGED
|
@@ -115,16 +115,18 @@ class MyDropdown(vm.Dropdown):
|
|
| 115 |
|
| 116 |
class Modal(vm.VizroBaseModel):
|
| 117 |
"""Modal to convey warning message"""
|
| 118 |
-
|
| 119 |
type: Literal["modal"] = "modal"
|
| 120 |
-
|
| 121 |
def build(self):
|
| 122 |
"""Returns the modal component."""
|
| 123 |
return dbc.Modal(
|
| 124 |
# id=self.id,
|
| 125 |
children=[
|
| 126 |
dbc.ModalHeader(children=dcc.Markdown("""# Warning""")),
|
| 127 |
-
dbc.ModalBody(
|
|
|
|
|
|
|
| 128 |
|
| 129 |
#### Reasoning:
|
| 130 |
This space is hosted publicly running one server in a single container. Further this UI executes dynamically created code on the server. It thus
|
|
@@ -132,15 +134,18 @@ cannot guarantee the security of your data. In addition it sends the user query
|
|
| 132 |
|
| 133 |
#### Alternatives:
|
| 134 |
If sending your query and data to a LLM is acceptable, you can pull and run this image locally. This will avoid sharing
|
| 135 |
-
an instance with others. You can do so by clicking the three dots in the top right of the HuggingFace banner
|
| 136 |
|
| 137 |
-
|
| 138 |
-
"""
|
|
|
|
|
|
|
| 139 |
],
|
| 140 |
size="l",
|
| 141 |
is_open=True,
|
| 142 |
)
|
| 143 |
|
|
|
|
| 144 |
class OffCanvas(vm.VizroBaseModel):
|
| 145 |
"""OffCanvas component for settings."""
|
| 146 |
|
|
|
|
| 115 |
|
| 116 |
class Modal(vm.VizroBaseModel):
|
| 117 |
"""Modal to convey warning message"""
|
| 118 |
+
|
| 119 |
type: Literal["modal"] = "modal"
|
| 120 |
+
|
| 121 |
def build(self):
|
| 122 |
"""Returns the modal component."""
|
| 123 |
return dbc.Modal(
|
| 124 |
# id=self.id,
|
| 125 |
children=[
|
| 126 |
dbc.ModalHeader(children=dcc.Markdown("""# Warning""")),
|
| 127 |
+
dbc.ModalBody(
|
| 128 |
+
children=dcc.Markdown(
|
| 129 |
+
"""### Do NOT upload any sensitive or personally identifying data.
|
| 130 |
|
| 131 |
#### Reasoning:
|
| 132 |
This space is hosted publicly running one server in a single container. Further this UI executes dynamically created code on the server. It thus
|
|
|
|
| 134 |
|
| 135 |
#### Alternatives:
|
| 136 |
If sending your query and data to a LLM is acceptable, you can pull and run this image locally. This will avoid sharing
|
| 137 |
+
an instance with others. You can do so by clicking the three dots in the top right of the HuggingFace banner and click `Run with Docker`.
|
| 138 |
|
| 139 |
+
Always exercise caution when sharing data online and understand your responsibilities regarding data privacy and security.```
|
| 140 |
+
"""
|
| 141 |
+
)
|
| 142 |
+
),
|
| 143 |
],
|
| 144 |
size="l",
|
| 145 |
is_open=True,
|
| 146 |
)
|
| 147 |
|
| 148 |
+
|
| 149 |
class OffCanvas(vm.VizroBaseModel):
|
| 150 |
"""OffCanvas component for settings."""
|
| 151 |
|