Commit
•
cea3391
1
Parent(s):
05175ea
fix: Update client retriever
Browse files
src/distilabel_dataset_generator/apps/sft.py
CHANGED
@@ -516,7 +516,7 @@ with gr.Blocks(
|
|
516 |
)
|
517 |
|
518 |
with gr.Tab(label="Argilla"):
|
519 |
-
if get_argilla_client():
|
520 |
with gr.Row(variant="panel"):
|
521 |
dataset_name = gr.Textbox(
|
522 |
label="Dataset name",
|
|
|
516 |
)
|
517 |
|
518 |
with gr.Tab(label="Argilla"):
|
519 |
+
if get_argilla_client() is not None:
|
520 |
with gr.Row(variant="panel"):
|
521 |
dataset_name = gr.Textbox(
|
522 |
label="Dataset name",
|
src/distilabel_dataset_generator/utils.py
CHANGED
@@ -87,11 +87,14 @@ def swap_visibilty(oauth_token: OAuthToken = None):
|
|
87 |
|
88 |
def get_argilla_client() -> Union[rg.Argilla, None]:
|
89 |
try:
|
|
|
|
|
|
|
|
|
|
|
90 |
return rg.Argilla(
|
91 |
-
api_url=
|
92 |
-
|
93 |
-
api_key=os.getenv("ARGILLA_API_KEY_SDG_REVIEWER")
|
94 |
-
or os.getenv("ARGILLA_API_KEY"),
|
95 |
)
|
96 |
except Exception:
|
97 |
return None
|
|
|
87 |
|
88 |
def get_argilla_client() -> Union[rg.Argilla, None]:
|
89 |
try:
|
90 |
+
api_url = os.getenv("ARGILLA_API_URL_SDG_REVIEWER")
|
91 |
+
api_key = os.getenv("ARGILLA_API_KEY_SDG_REVIEWER")
|
92 |
+
if api_url is None or api_key is None:
|
93 |
+
api_url = os.getenv("ARGILLA_API_URL")
|
94 |
+
api_key = os.getenv("ARGILLA_API_KEY")
|
95 |
return rg.Argilla(
|
96 |
+
api_url=api_url,
|
97 |
+
api_key=api_key,
|
|
|
|
|
98 |
)
|
99 |
except Exception:
|
100 |
return None
|