Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,17 @@ class DataEditor:
|
|
33 |
self.df['audio'] = self.sdata
|
34 |
self.df[['text','flag']]=self.data
|
35 |
return self.df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
def get_next_page(self,pagenumber):
|
37 |
|
38 |
if self.next_prveo<9:
|
@@ -127,6 +138,13 @@ class DataEditor:
|
|
127 |
|
128 |
def create_interface(self):
|
129 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
with gr.Column():
|
131 |
self.txturll = gr.Textbox(placeholder="link dir", interactive=True)
|
132 |
self.btn_displayy = gr.Button("Load Dataset")
|
|
|
33 |
self.df['audio'] = self.sdata
|
34 |
self.df[['text','flag']]=self.data
|
35 |
return self.df
|
36 |
+
def login(self, token):
|
37 |
+
# Your actual login logic here (e.g., database check)
|
38 |
+
if token == os.environ.get("token_login") :
|
39 |
+
return gr.update(visible=False),gr.update(visible=True),True
|
40 |
+
else:
|
41 |
+
return gr.update(visible=True), gr.update(visible=False),None
|
42 |
+
def load_demo(self,sesion):
|
43 |
+
if sesion:
|
44 |
+
return gr.update(visible=False),gr.update(visible=True)
|
45 |
+
|
46 |
+
return gr.update(visible=True), gr.update(visible=False)
|
47 |
def get_next_page(self,pagenumber):
|
48 |
|
49 |
if self.next_prveo<9:
|
|
|
138 |
|
139 |
def create_interface(self):
|
140 |
with gr.Blocks() as demo:
|
141 |
+
sesion_state = gr.State()
|
142 |
+
|
143 |
+
with gr.Column(scale=1, min_width=200,visible=True) as login_panal: # Login panel
|
144 |
+
gr.Markdown("## auth acess page")
|
145 |
+
token_login = gr.Textbox(label="token")
|
146 |
+
|
147 |
+
login_button = gr.Button("Login")
|
148 |
with gr.Column():
|
149 |
self.txturll = gr.Textbox(placeholder="link dir", interactive=True)
|
150 |
self.btn_displayy = gr.Button("Load Dataset")
|