small fix when changing from tab and ensure pushing to argilla
Browse files
src/synthetic_dataset_generator/apps/rag.py
CHANGED
@@ -424,6 +424,13 @@ def push_dataset(
|
|
424 |
push_dataset_to_hub(
|
425 |
dataframe, org_name, repo_name, oauth_token, private, pipeline_code
|
426 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
try:
|
428 |
progress(0.1, desc="Setting up user and workspace")
|
429 |
hf_user = HfApi().whoami(token=oauth_token.token)["name"]
|
@@ -563,7 +570,13 @@ def show_document_column_visibility():
|
|
563 |
|
564 |
|
565 |
def hide_document_column_visibility():
|
566 |
-
return {
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
|
568 |
|
569 |
def show_pipeline_code_visibility():
|
|
|
424 |
push_dataset_to_hub(
|
425 |
dataframe, org_name, repo_name, oauth_token, private, pipeline_code
|
426 |
)
|
427 |
+
dataframe = dataframe[
|
428 |
+
dataframe.applymap(
|
429 |
+
lambda x: str(x).strip() if pd.notna(x) else x
|
430 |
+
).apply(
|
431 |
+
lambda row: row.notna().all() and (row != "").all(), axis=1
|
432 |
+
)
|
433 |
+
]
|
434 |
try:
|
435 |
progress(0.1, desc="Setting up user and workspace")
|
436 |
hf_user = HfApi().whoami(token=oauth_token.token)["name"]
|
|
|
570 |
|
571 |
|
572 |
def hide_document_column_visibility():
|
573 |
+
return {
|
574 |
+
document_column: gr.Dropdown(
|
575 |
+
choices=["Load your data first in step 1."],
|
576 |
+
value="Load your data first in step 1.",
|
577 |
+
visible=False,
|
578 |
+
)
|
579 |
+
}
|
580 |
|
581 |
|
582 |
def show_pipeline_code_visibility():
|