> For the complete documentation index, see [llms.txt](https://saral.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://saral.sunbird.org/use/firebase-setup-for-tflite-model-deployment.md).

# Firebase setup for TFLite model deployment

Firebase setup for TFLite model deployment

### **Firstly We need an account of firebase to publish and download TFLite model**

<https://console.firebase.google.com/>

#### **1. Enter project name:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-108ed7dadc698cc54afa06bba7497bdb77a3a670%2Ftflite_setup_step1.png?alt=media)

#### **2. Press on Continue button:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-0384acd249a7addc9d080a0361c1d8e4e3036224%2Ftflite_setup_step2.png?alt=media)

#### **3. Select Account to continue:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-f47a31f87074f14aecd3babb37d61f5b3823396a%2Ftflite_setup_step3.png?alt=media)

#### **4. Press on continue button:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-00eeebaa4f141ed253cb3c7eaea97cf7dab94935%2Ftflite_setup_step4.png?alt=media)

#### **5. Click on Android:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-2374b49182b847af85ee40727968162b00e7e015%2Ftflite_setup_step5.png?alt=media)

#### **6. Add package name which will get from android/app/build.gradle file then once added package name click on Register button:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-536118915f1ac89456546c9f4b71e0720c1bf22a%2Ftflite_setup_step6.png?alt=media)

#### **7. Download Service json file:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-bcca379bfe6fd6d43d56e006c4e25f33e91241c3%2Ftflite_setup_step7.png?alt=media)

#### **8. Do not add this dependency which is already added in project:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-8c19fd8f8276590bb3670d67e8eece8b2a94052c%2Ftflite_setup_step8.png?alt=media)

#### **9. Press continue button:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-a0501ebc4441fe956bb17d619c5b490e7920da46%2Ftflite_setup_step9.png?alt=media)

### **Firebase setup for Remote configuration to enable TFLite model**

i) If remote config flag is set as true in firebase.\
ii) Then tflite model will be downloaded in mobile once it's timer completed.\
iii) Timer can be change in RemoteConfig.java file.\
iv) Timer will be count in second.

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-7ea2cbdbf519956e54fdd36fdb361d5cbe6694a6%2Ftflite_setup_config.png?alt=media)

### **There are some step for enable remote configuration which are listed below.**

#### **1. Press on Remote Config**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-f995f3138b9cae663263bd48a942cab515d380d5%2Ftflite_setup_config1.png?alt=media)

#### **2. Press on Create Configuration**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-0c44bcd9c7de358af3409cbc3b96b236a022578c%2Ftflite_setup_config2.png?alt=media)

#### **3. Add field name with its data type and save it:**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-5487187fbcef53ed41054a2abd8ecf122a43469b%2Ftflite_setup_config3.png?alt=media)

#### **4. Click on Publish Changes**

![](https://811030052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLe89Gzl6JNQ9inpB8sRg%2Fuploads%2Fgit-blob-8d28ffa1da4272c381bd413e6eb93a49efb3b1cf%2Ftflite_setup_config4.png?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://saral.sunbird.org/use/firebase-setup-for-tflite-model-deployment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
