Not able to use local images

i have images in my local system,how can i display those images in rasa ui

domain.yml:

utter_reimbursement_process:

  • text: below is the process flow for reimbursement

    image: ./process_flow.jpg

after rasa train i am running the rasa x,it’s showing this messageScreenshot%20from%202019-08-29%2011-55-12

plz help me, thanks in advance

Please send pic of domain file and directory.

No one has the answere ?

I’m facing the same issue.

I thought to use an api or something like this to get an url. But I don’t know how to do so.

The issue seems to be that rasa sends a url. And when slack or Facebook receive the local url, it just dosn’t understand.

You can do so by setting up an API as you said.

To do so :

I first created a img folder in my project. My project looks like this :

files

The content of the app.py file is the following :

from flask import Flask, send_file

app = Flask(__name__)

@app.route('/img/<path:path>')
def get_image(path):
    image_path = 'img/{}'.format(path)

    return send_file(image_path, mimetype='image/gif')

if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=7000)

If you run python app.py this API will be launched and hitting to http://localhost:7000/img/my_image.png is going to show your my_image.png image in the img folder.

Now insert the link of your image (starting by http://localhost:7000/img/...) in your utterances in your domain.yml file and all your images should show up in your interface in Rasa X :slight_smile:

PS : you are free to change ports, folder names, etc…

1 Like

Thanks for the reply,

The above solution what you said will be good for rasa x ui,how can i handle this with custom ui,i mean rasax ui directly load image but custom ui not, how can we display the image in custom ui.

and also can you tell me how to integrate rasa with custom userinterface

thanks in advance