peterkros commited on
Commit
dec9d6f
·
verified ·
1 Parent(s): bc27e82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -60,18 +60,15 @@ def main():
60
  submit_btn = gr.Button("Send")
61
  response_output = gr.Textbox(label="Bot Response")
62
 
63
- def combined_function(message, selected_topics):
64
- return generate_response(message, [selected_topics])
65
-
66
  submit_btn.click(
67
- fn=combined_function,
68
  inputs=[message_input, topics_dropdown],
69
  outputs=response_output
70
  )
71
 
72
  demo.launch()
73
 
74
-
75
  # Run the app
76
  if __name__ == "__main__":
77
- iface.launch()
 
60
  submit_btn = gr.Button("Send")
61
  response_output = gr.Textbox(label="Bot Response")
62
 
63
+ # Corrected to directly pass selected_topics without wrapping it in another list
 
 
64
  submit_btn.click(
65
+ fn=generate_response,
66
  inputs=[message_input, topics_dropdown],
67
  outputs=response_output
68
  )
69
 
70
  demo.launch()
71
 
 
72
  # Run the app
73
  if __name__ == "__main__":
74
+ main()