tykimos commited on
Commit
c7f4c7b
·
1 Parent(s): b6f65bf

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import streamlit.components.v1 as components
3
+ import bar_chart_race as bcr
4
+ import base64
5
+
6
+ df = bcr.load_dataset("covid19_tutorial")
7
+ html_str = bcr.bar_chart_race(df=df).data
8
+
9
+ start = html_str.find('base64,')+len('base64,')
10
+ end = html_str.find('">')
11
+
12
+ video = base64.b64decode(html_str[start:end])
13
+ st.video(video)