Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| def process(git_repo_url, space_destination, user_token): | |
| return "hello" | |
| css = """ | |
| div#col-container{ | |
| margin: 0 auto; | |
| max-width: 720px; | |
| } | |
| """ | |
| with gr.Blocks(css=css) as demo: | |
| with gr.Column(elem_id="col-container"): | |
| git_repo_url = gr.Textbox( | |
| label="Git repo to clone" | |
| ) | |
| space_destination = gr.Textbox( | |
| label="Space ID" | |
| ) | |
| user_token = gr.Textbox( | |
| label="Write permissions token", | |
| type="password" | |
| ) | |
| submit_btn = gr.Button("Clone git repo to my space") | |
| status = gr.Textbox( | |
| label="Status" | |
| ) | |
| submit_btn.click( | |
| fn=process, | |
| inputs=[git_repo_url, space_destination, user_token], | |
| outputs=[status] | |
| ) | |
| demo.launch() |