import re
text = r"{\' A}vila,  Y{\`e}che, {'hallo}"

encodings = {
    "\\'": u'\u0300',
    "\\`": u'\u0302',
}

def repl(m):
    encoding = m.group(1)
    string_content = m.group(2)
    if encoding in encodings:
    	return string_content + encodings[encoding]
    return string_content

changed_text = re.sub(r'\{([^\w\s]+|_)\s*(\w)}', repl, text)
print(changed_text)