Doubleupai commited on
Commit
41327fb
·
verified ·
1 Parent(s): 83dfb0e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import time
3
+
4
+ def generate_code(url, project_name):
5
+ time.sleep(25)
6
+ return f"Generated code for {project_name} at {url}"
7
+
8
+ with gr.Blocks() as demo:
9
+ gr.Markdown("### Link to Code Generator")
10
+ url_input = gr.Textbox(label="Enter Website URL")
11
+ project_name_input = gr.Textbox(label="Enter Project Name")
12
+ output = gr.Textbox(label="Generated Code", interactive=False)
13
+ submit_button = gr.Button("Generate Code")
14
+
15
+ submit_button.click(generate_code, inputs=[url_input, project_name_input], outputs=output)
16
+
17
+ demo.launch()