---
title: Text Recommendation
slug: text-recommendation
docTags: 
createdAt: 2023-07-19T04:19:33.549Z
---

The below input parameters are for different attack types. To start working with the APIs, see [Text Recommendation (Alpha-release)](docId\:pF0-V4Ug62-akwbXCLkoZ)

:::hint{type="warning"}
Text Recommendation is an early access with limited functionality. It is not available  in AIShield pypi package. For early access, kindly contact [AIShield.Contact@bosch.com](mailto\:AIShield.Contact@bosch.com)
:::

### File upload format

- **Data**: The processed data, ready to be passed to the model for prediction, should be saved in a folder.

[Download sample data](https://aisdocs.blob.core.windows.net/reference/upload/Text/TextRecommendation/data.zip)

- **Model**: The model should be saved in either .h5 or TensorFlow format.

[Download sample model](https://aisdocs.blob.core.windows.net/reference/upload/Text/TextRecommendation/model.zip)

## Common parameters

The below table parameters are common for Extraction Attack type.&#x20;

| Parameter                      | Data type | Description                                                                                                                                                                                      | Remark                                                                                                                                                        |
| ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| model\_Id                      | String    | Model\_id received during model registration.<br />We need to provide this model ID in query parameter in URL.                                                                                   | You have to do model registration only once for a model to perform model analysis. This will help you track the no of api call made, and it's success metric. |
| **Request Body (Json format)** |           |                                                                                                                                                                                                  |                                                                                                                                                               |
| model\_api\_details            | String    | If use\_model\_api is Yes, then provide API<br />details of hosted model as encrypted JSON<br />string is mandatory                                                                              | provide this only if use\_model\_api is "yes".                                                                                                                |
| use\_model\_api                | String    | Use model API to train your model instead of uploading the model as a zip file.                                                                                                                  | when this parameter is yes, you don't have to upload model as zip. You can pass api url along with other verification credential in json file.                |
| model\_framework               | String    | Original model is built with tensorflow framework.                                                                                                                                               | curretly supported framework are: tensorflow, scikit-learn, keras. (Option:\[tensorflow])                                                                     |
| title                          | string    | movie title for the recommendation                                                                                                                                                               | movie title for which the recommendation is requested from model                                                                                              |
| encryption\_strategy           | Int       | Choose a encryption strategy for you model. if model is uploaded directly as a<br />zip pick 0, 1 if model is encryted as .pyc and<br />uploaded as a zip. Ignore if use\_model\_api is<br />Yes | select 0: pass tensorflow model as it is, select 1: pass encrypted model. It could be .pyc file                                                               |



:::hint{type="info"}
To access all sample artifacts, please visit [Artifacts](docId\:iJNEOCXoStabvvrsq11fa).&#x20;

- For specific artifact details,  refer&#x20;
  - Vulnerability Report : [Vulnerability Report](docId\:hL0uT2MWlCBkt8F97fr-W)    &#x20;
:::

:::hint{type="info"}
**Note**: For Text recommendation, supported attack types are - Extraction
:::

