Hey Everyone!
With only a couple of days until the Win your Turkey Dinner Contest! I wanted to show you all what I have been working on!
This is just a fun little app that lets you pick from a set of either gif’s or emoji’s (more like thanksgiving themed images, as some of them are a bit too big to be emoji’s! ) and click a button to download them to share with others!
Check out my app here!
Happy Thanksgiving and Streamlit-ing!!
4 Likes
Hey, can I use your code to make the user be able to download an apk file ?
Hey @Shivam_purbia !
Absolutely, cause its not my code it’s actually code that I borrowed from our amazing community!!!
It was posted by @GokulNC in this thread:
I wrote a generic downloader that should work for any type of file that’s stored on your disk.
Though some developers may whine that this is not the right/optimal thing to do, well, who cares
So here you go.
The function:
import os
import base64
def get_binary_file_downloader_html(bin_file, file_label='File'):
with open(bin_file, 'rb') as f:
data = f.read()
bin_str = base64.b64encode(data).decode()
href = f'<a href="data:application/octet-stream;base64,{bin_str}" d…
Happy Streamlit-ing!
Marisa