srinuksv commited on
Commit
314e609
1 Parent(s): e210be7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -90,17 +90,18 @@ input_component = gr.Textbox(
90
  lines=2
91
  )
92
 
93
- output_component = gr.Textbox(
94
  label="Bot:",
95
- placeholder="Bot's response will appear here...",
96
- disabled=True, # Make the textbox read-only
97
- lines=2
98
  )
99
 
100
  # Function to handle queries
101
  def chatbot_handler(query):
102
- response = handle_query(query)
103
- return response
 
 
104
 
105
  # Create the Gradio interface with chat-like settings
106
  interface = gr.Interface(
 
90
  lines=2
91
  )
92
 
93
+ output_component = gr.Output(
94
  label="Bot:",
95
+ type="text",
96
+ initial="Bot's response will appear here...",
 
97
  )
98
 
99
  # Function to handle queries
100
  def chatbot_handler(query):
101
+ with output_component:
102
+ response = handle_query(query)
103
+ print(f"User: {query}\nBot: {response}\n")
104
+ return response
105
 
106
  # Create the Gradio interface with chat-like settings
107
  interface = gr.Interface(