Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,14 +24,27 @@ def convert_to_onnx(model,namemodelonxx):
|
|
| 24 |
)
|
| 25 |
return x
|
| 26 |
with gr.Blocks() as demo:
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
)
|
| 25 |
return x
|
| 26 |
with gr.Blocks() as demo:
|
| 27 |
+
sesion_state = gr.State()
|
| 28 |
+
|
| 29 |
+
with gr.Column(scale=1, min_width=200,visible=True) as login_panal: # Login panel
|
| 30 |
+
gr.Markdown("## auth acess page")
|
| 31 |
+
token_login = gr.Textbox(label="token")
|
| 32 |
+
|
| 33 |
+
login_button = gr.Button("Login")
|
| 34 |
+
with gr.Row(scale=1, visible=False) as main_panel:
|
| 35 |
+
with gr.Column():
|
| 36 |
+
text_n_model=gr.Textbox(label="name model")
|
| 37 |
+
text_n_token=gr.Textbox(label="token")
|
| 38 |
+
text_n_onxx=gr.Textbox(label="name model onxx")
|
| 39 |
+
with gr.Column():
|
| 40 |
|
| 41 |
+
btn=gr.Button("convert")
|
| 42 |
+
label=gr.Label("return name model onxx")
|
| 43 |
+
btn.click(install_model,[text_n_model,text_n_token,text_n_onxx],[label])
|
| 44 |
+
|
| 45 |
+
login_button.click(self.login, inputs=[token_login], outputs=[login_panal,main_panel,sesion_state])
|
| 46 |
+
demo.load(self.load_demo, [sesion_state], [login_panal,main_panel])
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
demo.launch
|
| 50 |
+
|