Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,6 +79,8 @@ pwd_aoai_url = PasswordInput(
|
|
| 79 |
placeholder="Enter your Azure OpenAI Base Url here...",
|
| 80 |
sizing_mode="stretch_width",
|
| 81 |
)
|
|
|
|
|
|
|
| 82 |
|
| 83 |
def check_yi_mode(event):
|
| 84 |
# Make openai_row invisible when local YI Mode is enabled and vice versa.
|
|
@@ -94,12 +96,13 @@ YI_MODE.param.watch(check_yi_mode, 'value')
|
|
| 94 |
|
| 95 |
yi_widgets = pn.Column(
|
| 96 |
pn.pane.Markdown("### Local YI Mode: "),
|
| 97 |
-
YI_MODE,
|
|
|
|
| 98 |
pn.pane.Markdown("### Yi Endpoint: "),
|
| 99 |
YI_ENDPOINT
|
| 100 |
)
|
| 101 |
template.main.append(yi_widgets)
|
| 102 |
-
openai_row = pn.Row(txt_model, pwd_openai_key, pwd_openai_url)
|
| 103 |
file_cfg = pn.widgets.FileInput(filename="OAI_CONFIG_LIST", sizing_mode="stretch_width")
|
| 104 |
template.main.append(
|
| 105 |
pn.Column(
|
|
|
|
| 79 |
placeholder="Enter your Azure OpenAI Base Url here...",
|
| 80 |
sizing_mode="stretch_width",
|
| 81 |
)
|
| 82 |
+
RAG = pn.widgets.FileInput(filename="RAG", sizing_mode="stretch_width")
|
| 83 |
+
|
| 84 |
|
| 85 |
def check_yi_mode(event):
|
| 86 |
# Make openai_row invisible when local YI Mode is enabled and vice versa.
|
|
|
|
| 96 |
|
| 97 |
yi_widgets = pn.Column(
|
| 98 |
pn.pane.Markdown("### Local YI Mode: "),
|
| 99 |
+
YI_MODE,
|
| 100 |
+
RAG,
|
| 101 |
pn.pane.Markdown("### Yi Endpoint: "),
|
| 102 |
YI_ENDPOINT
|
| 103 |
)
|
| 104 |
template.main.append(yi_widgets)
|
| 105 |
+
openai_row = pn.Row(txt_model, pwd_openai_key, pwd_openai_url, pwd_aoai_key, pwd_aoai_url)
|
| 106 |
file_cfg = pn.widgets.FileInput(filename="OAI_CONFIG_LIST", sizing_mode="stretch_width")
|
| 107 |
template.main.append(
|
| 108 |
pn.Column(
|