yetessam commited on
Commit
ca96d09
·
verified ·
1 Parent(s): f8050cc

Update ContentGradio.py

Browse files
Files changed (1) hide show
  1. ContentGradio.py +5 -2
ContentGradio.py CHANGED
@@ -58,8 +58,11 @@ def create_main():
58
  with gr.Row():
59
  with gr.Column():
60
  user_input = gr.Textbox(label="Your Input", placeholder="Enter something here...")
61
- output = gr.Textbox(label="Output", interactive=False)
62
- # move this down to ensure that output it defined
 
 
 
63
  user_input.submit(process_input, inputs=user_input, outputs=output)
64
 
65
  return user_input, output # Return both input and output components
 
58
  with gr.Row():
59
  with gr.Column():
60
  user_input = gr.Textbox(label="Your Input", placeholder="Enter something here...")
61
+ submit_button = gr.Button("Submit")
62
+ output = gr.Textbox(label="Content feedback", interactive=False, lines=10, max_lines=20, width=600)
63
+
64
+ # Define the function to be called when the button is clicked or Enter is pressed
65
+ submit_button.click(process_input, inputs=user_input, outputs=output)
66
  user_input.submit(process_input, inputs=user_input, outputs=output)
67
 
68
  return user_input, output # Return both input and output components