# Streamlit Deployment

### Notebook Code

You need to create variables/objects needed in your Streamlit app in a notebook. This can be later reference in the streamlit app code.

For example, in the screenshot below a df called employees is created in a notebook block

<figure><img src="/files/OZjwyW5rfpMPf0BRxkJZ" alt=""><figcaption></figcaption></figure>

### Referencing variables

To reference a variable/object in the canvas use the following code:

```
from zerve import variable
name = variable ("block_name", "variable_name")
```

In the above example, our block name is employee\_data and the required df is stored as employees. In this example the code to reference the df is:

```
from zerve import variable
employees = variable ("employee_data", "employees")
```

### Instance Type

You can chose any instance type for your deployment.&#x20;

### Example

The following video shows how we can deploy the Streamlit app.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FSW8Q5siai6X8jbqhUi5b%2FStreamit_cut.mp4?alt=media&token=37164c95-a2fc-40ff-9989-2f2459ca512e>" %}


---

# 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.zerve.ai/guide/notebook-view/deployment/streamlit-deployment.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.
