How to deploy a deep learning model in Flask (Python)?
You need to write a simple web application with one endpoint. I've checked the mmf doc you can load a model using it's keys:

from flask import Flask, jsonify, request
from mmf.common.registry import registry

model_cls = registry.get_model_class(&quot;&lt;DESIRED_MODEL_KEY&quot;&gt;)
model = model_cls.from_pretrained(&quot;&lt;DESIRED_PRETRAINED_ZOO_KEY&gt;&quot;)

@app.route('/predict', methods=['POST'])
def predict():
    data = request.get_data()
    prediction = model(data)
    return jsonify(list(prediction))

app.run(host='0.0.0.0', port=8000)

I haven't ran that code but I know for a fact that this won't run out of the box. data is a dictionary and you need to get the right key and convert the value
to a numpy array or Torch tensor. And predict will be a numpy array (or Torch tensor - but can be converted back to numpy) and you will need to convert everything back to a standard python format (because numpy or torch data types are not json serialisable).