gopichandra commited on
Commit
ed63f50
·
verified ·
1 Parent(s): de8ac59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -471,9 +471,20 @@ def app():
471
  )
472
 
473
  return interface
 
 
 
 
 
 
 
 
 
 
 
474
 
475
- if __name__ == "__main__": # Colon at the end of 'if' statement
476
- app().launch(server_name="0.0.0.0", server_port=7860, share=True) # Indented correctly
477
 
478
 
479
 
 
471
  )
472
 
473
  return interface
474
+ import gradio as gr
475
+
476
+ def sample_function(input_text):
477
+ return f"Processed: {input_text}"
478
+
479
+ with gr.Blocks() as app:
480
+ gr.Markdown("## My Gradio App")
481
+ input_box = gr.Textbox(label="Enter something")
482
+ output_box = gr.Textbox(label="Output")
483
+ button = gr.Button("Submit")
484
+ button.click(sample_function, inputs=input_box, outputs=output_box)
485
 
486
+ if __name__ == "__main__":
487
+ app.launch(server_name="0.0.0.0", server_port=7860, share=True)
488
 
489
 
490