osanseviero commited on
Commit
b01e314
1 Parent(s): 4242ca3

Add disabled view if not logged in

Browse files
src/distilabel_dataset_generator/apps/sft.py CHANGED
@@ -1,5 +1,6 @@
1
  import multiprocessing
2
  import time
 
3
 
4
  import gradio as gr
5
  import pandas as pd
@@ -152,11 +153,16 @@ def generate_pipeline_code() -> str:
152
 
153
  return pipeline_code
154
 
 
 
 
155
 
156
  with gr.Blocks(
157
  title="⚗️ Distilabel Dataset Generator",
158
  head="⚗️ Distilabel Dataset Generator",
 
159
  ) as app:
 
160
  gr.Markdown("## Iterate on a sample dataset")
161
  with gr.Column() as main_ui:
162
  dataset_description = gr.TextArea(
@@ -231,8 +237,6 @@ with gr.Blocks(
231
  )
232
 
233
  with gr.Row(variant="panel"):
234
- get_login_button()
235
- hf_token = gr.Textbox(label="HF token", type="password")
236
  org_name = get_org_dropdown()
237
  repo_name = gr.Textbox(label="Repo name", placeholder="dataset_name")
238
  private = gr.Checkbox(
 
1
  import multiprocessing
2
  import time
3
+ from typing import Union
4
 
5
  import gradio as gr
6
  import pandas as pd
 
153
 
154
  return pipeline_code
155
 
156
+ css = """
157
+ .main_ui_logged_out{opacity: 0.3; pointer-events: none}
158
+ """
159
 
160
  with gr.Blocks(
161
  title="⚗️ Distilabel Dataset Generator",
162
  head="⚗️ Distilabel Dataset Generator",
163
+ css=css
164
  ) as app:
165
+ get_login_button()
166
  gr.Markdown("## Iterate on a sample dataset")
167
  with gr.Column() as main_ui:
168
  dataset_description = gr.TextArea(
 
237
  )
238
 
239
  with gr.Row(variant="panel"):
 
 
240
  org_name = get_org_dropdown()
241
  repo_name = gr.Textbox(label="Repo name", placeholder="dataset_name")
242
  private = gr.Checkbox(