# Preparing your AI Model

Your model should have the following structure:

* *Input* (Directory)
* *Output* (Directory)
* *requirements.txt* (File)
* *README.md* (File)
* *src* (Directory)
* *src / run.py* (File)
* *stats* (Directory)

**Input** - 'Input' directory contains sample source images / Videos for inference.

**Output** - 'Output' directory contains sample outputs which were generated by inference on 'Input' directory.

**requirements.txt** - 'requirements.txt' should list all the python dependencies with versions. You can use: `pip freeze > requirements.txt` to generate this file.

**README.md** - This file tells other people why your project is useful, what they can do with your project, and how they can use it.

**src** - 'src' directory contains all the source code for I/O, pre-processing and post-processing along with the trained model.

**src/run.py** - This is the main python file that the user calls. It should be able to take at least 'input' (Input path) and 'output' (Output path) as arguments. Example -

`python src/run.py --input Input --output Output`

**stats** - This directory may contain one or more files. Each file stores inference time taken on particular hardware. Example - 'cpu.txt' stores inference time on CPU.

{% hint style="warning" %}
Above mentioned are the necessary files/directories which your model should have. It may contain additional files if your model requires.
{% endhint %}

Once you have structured your model according to the above template, compress the folder as a zip file.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dockship.io/publishing-your-ai-model/prepare-your-model-based-on-dockship.io-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
