Closed kunjmehta closed 5 years ago
@kunjmehta
One way to do this would be to:
1) Store the URL/path of the image in the training data
2) Check for these URLs/paths on the front-end and instead of displaying the answer as raw text, display it as an <img src="URL/path" />
tag
Thanks! Did this. I had another doubt. I am making a chatbot that takes inputs from the values of buttons that the user clicks instead of a text box. How do I dynamically change the values and the numbers of these buttons?
@kunjmehta Apologies for the late response!
You'd have to use JavaScript to (1) get a reference to the DOM element that represents your button and (2) change some attribute of that DOM element. Here's a nice explanation: https://stackoverflow.com/a/5580652
Thanks again! Works perfectly!
@chamkank How to get an image as a response from the bot?