Display rasa chatbot buttons in flask

Hello to everyone. I 'm making a chatbot with 2 buttons. It works on the backend but I can’t display buttons in flask, only the titles of them. Could someone help me please?

class ActionService(Action):

 def name(self) -> Text:
     return "action_service"

 def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
     
     
     buttons=[
     {"payload" : "/what_c", "title": "What is covid-19?"},
     {"payload" : "/symptoms", "title": "What are the symptoms of covid-19?"}
     ]
     dispatcher.utter_message("I can help you!",buttons=buttons)
     return []

and the app.py

def chatbot_response():
    msg = request.form["msg"]
    data = json.dumps({
        "sender": "Rasa",
        "message": msg
        })
    headers = {'Content-type': 'application/json', 'Accept': 'text/plain', }
    res = requests.post('http://localhost:5005/webhooks/rest/webhook', data= data, headers = headers)
    res = res.json()
    resp=[]
    for i in range(len(res)):
        message = {
            "": res[i].get("text")
            }
        if res[i].get("buttons"):  e
            options = [b.get("title") for b in res[i].get("buttons")]
            message["options"] = options
    resp.append(message)
    result=resp
    return str(result)

Thank you in advance

Hi and welcome.

Not that I know the first thing about Flask, but on the face of it, you may need to make the ‘buttons’ Global as (so far as I can see) they look as if they’re local to the function, as is.

@rob42 thank you for your quick response!
The problem is that I can only display strings and I don’t know how to display clickable buttons
covbot