Spaces:
Build error
Build error
| import gradio as gr | |
| import time | |
| def generate_code(url, project_name): | |
| time.sleep(25) | |
| return f"Generated code for {project_name} at {url}" | |
| with gr.Blocks() as demo: | |
| gr.Markdown("### Link to Code Generator") | |
| url_input = gr.Textbox(label="Enter Website URL") | |
| project_name_input = gr.Textbox(label="Enter Project Name") | |
| output = gr.Textbox(label="Generated Code", interactive=False) | |
| submit_button = gr.Button("Generate Code") | |
| submit_button.click(generate_code, inputs=[url_input, project_name_input], outputs=output) | |
| demo.launch() | |