Inserting above the comment template

It mainly depends on a theme, whether there is a hook, in which you can call an action.

Simple ways, how to do that:

  1. You insert your code directly into single.php, right above the code calling comments_template(),
  2. You create a hook (e.g. above comments_template()) as do_action('my_hook') and then you hook into it your function add_action('my_hook', 'function_i_want_to_hook')
  3. Or you do the same as steps above, however, working with file, where comments template code resides, i.e. comments.php