Streamlit Deployment as an Executable File (.exe) For Windows MacOS And Android

Hi Everyone My First Post Here. So I recently Discovered A Way To Make A Streamlit App as A Windows or Mac OS Executable File, So Here Are the Steps:

  1. Deploy Yout Streamlit App Using Streamlit Sharing And Make A Note of that url for example:
    https://share.streamlit.io/the-ml-hero/dentaldiagnosistools/main/app.py
  2. Then Install Nativefier npm install -g nativefier
  3. Then Run nativefier --name '<you .exe name>' '<your streamlit sharing website url>' --platform <'windows' or 'mac' or 'linux'>
  4. Then In your current Directory You should see <AppName>-32-x64 folder or similar if you have chosen windows run the .exe file and you have you software.

If you have any problems or queries comment below I’ll try my best to answer them if I have time. Thanks!

PS: Check Out My Software Page https://the-ml-hero.itch.io/dental-diagnosis I Deployed It to Mac , Windows And Even Android

45 Likes

This is soooo amazing @Super-MAN, now we can create a web app and desktop app in one go. I tried it and it was super easy. Thanks.

The command I used to create the app:

C:\Users\sree3\Downloads>nativefier --name Audiofy https://share.streamlit.io/sree369nidhi/audiobook/main/pdf_to_audiobook.py --platform windows

7 Likes

Thanks! I’m Glad That I Could Help and

By The Way Do You Also Want To Know How To Run Streamlit Apps Natively On Android?
As a Standalone Application Like The One On Your PC But in a Mobile Android Device?

Let Me Know And I’ll Share the Steps


2 Likes

wow that would be amazing, please do share.

1 Like

Deploy To Android

1. Deploy Yout Streamlit App Using Streamlit Sharing And Make A Note of that url for example:

https://share.streamlit.io/the-ml-hero/dentaldiagnosistools/main/app.py

  1. Then Go to https://gonative.io/

  2. Then Type In your url for your web app

  3. It should Ask for some configuration Just Change the App Icon And Leave Everything Else Default

  4. It should Also Ask For you email address this is for sending the apk file of your app

6.After a while (1-2 mins) you should see an email from gonative click on that management link

  1. Download Your APK and test it on your device

NOTE: It also gives you an IOS Version but you will have to build it yourself which required
XCODE which is only on MAC-OS

10 Likes

Thanks @Super-MAN, so cool.

3 Likes

Did you manage to get it working or do you have any issues?

1 Like

Yes, It was super easy, It worked & No issues.

3 Likes

Thanks For The Feedback!

1 Like

Worked perfectly, thanks! Have you tried this out on Heroku by any chance?

1 Like

No I haven’t But it should work 'cause both platforms deploy your app as an website and nativefier requires a website url not specifically an streamlit sharing url.

So in the end it doesn’t matter where to deploy just get the url and paste it in the nativefier url

1 Like

Sorry to reopen the subject. I am currently working on a Data Science project which necessit to store files (using seafile cloud solution). I would like to know if with those executables we can access to local file from our computer ?

Great job!!! I’m wondering is there any possibility to share executive file in offline environment?

1 Like

Same problem here for windows.

Hi @imClumsyPanda,

The instructions are a bit convoluted at the moment, but our approach was to use pyinstaller to creat streamlit executables:

Thanks a lot! And I’ll have a try!

Simon Biggs via Streamlit <streamlit@discoursemail.com>于2021年2月7日 周日上午5:20写道:

I did it and it worked perfectly :ok_hand:t3:

2 Likes

This you just did is so amazing. My respect for you.

1 Like

Hello for your solution to work is it required to have the model deployed on streamlit since I tried it with a private github repo the app had been built but when I opened it, it shows a blank white screen