Share custom pipelines on Huggingface Hub
# 🚀 Feature request

Publish and share custom pipelines on Huggingface Hub.

## Motivation

It seems that the models section on Huggingface Hub is currently useful only for use cases supported out-of-the-box by the huggingface/transformers library, e.g., for sequence classification, masked pretraining, and sequence-to-sequence classification (e.g., translation). However, if one has a different use case, such as target-dependent sentiment classification (TSC), it seems the Hub is not the right platform to publish the model, since neither the Inference API will work not will users not be able to use AutoModel.from_pretrained("somehuggingfacehuburltoamodel") work out-of-the-box. 

For example, in the case of TSC, the input consists of two parts: a sentence and a target phrase within, whereas the latter is typically expressed as two char-based indexes. For example, an input might be ("I like Bert but I hate Robert", 7, 11), and the model should then identify the sentiment of this sentence towards the target "Bert" (defined by the indexes 7 and 11). 

It seems to me that [pipelines](https://huggingface.co/docs/transformers/master/add_new_pipeline) are a solution to this, where one could identify how to preprocess such inputs and then correspondingly postprocess the model's outputs. However, I could not find a way to publish one's pipelines. This in turn makes Huggingface Hub currently not really usable for any use case different to those supported also by the Huggingface Transformers library. 

## Your contribution

This issue seems to be more related to the huggingface hub, so it would be interesting to see your thoughts first. If there need to be changes done in the transformers library, I'm glad to talk about necessary changes and how I can help :)

cc @osanseviero and @LysandreJik!<|||||>Hey @fhamborg! That would be a super cool complement to @sgugger's great work on making models/tokenizers/configurations accessible from the hub!<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.