title: How to add multiple body params with fileupload in FastAPI?
body: <p>I have a machine learning model deployed using FastAPI, but the issue is I need the model to take two-body parameters</p>
  <pre><code>app = FastAPI()
  
  class Inputs(BaseModel):
      industry: str = None
      file: UploadFile = File(...)
  
  @app.post(&quot;/predict&quot;)
  async def predict(inputs: Inputs):
      # params
      industry = inputs.industry
      file = inputs.file
      ### some code ###
      return predicted value
  </code></pre>
  <p>When I tried to send the input parameters I am getting an error in postman, please see the pic below,</p>
  <p><a href="https://i.stack.imgur.com/tt8FJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tt8FJ.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/8IpJ5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8IpJ5.png" alt="enter image description here" /></a></p>