Spaces:
Runtime error
Runtime error
tracinginsights
commited on
Commit
•
119bf10
1
Parent(s):
cc725a0
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from git import Repo
|
2 |
+
import os
|
3 |
+
import streamlit as st
|
4 |
+
#import streamlit_analytics
|
5 |
+
from PIL import Image
|
6 |
+
|
7 |
+
st.set_page_config(
|
8 |
+
page_title="TRACING INSIGHTS",
|
9 |
+
page_icon=None,
|
10 |
+
layout="wide",
|
11 |
+
initial_sidebar_state="expanded",
|
12 |
+
# menu_items={
|
13 |
+
# 'Get Help': 'https://www.extremelycoolapp.com/help',
|
14 |
+
# 'Report a bug': "https://www.extremelycoolapp.com/bug",
|
15 |
+
# 'About': "# This is a header. This is an *extremely* cool app!"
|
16 |
+
# }
|
17 |
+
)
|
18 |
+
|
19 |
+
GITHUB_PAT = os.environ['GITHUB']
|
20 |
+
|
21 |
+
if not os.path.exists('repo_directory'):
|
22 |
+
Repo.clone_from(f'https://tracinginsights:{GITHUB_PAT}@github.com/TracingInsights/F1.git', 'repo_directory' )
|
23 |
+
|
24 |
+
from repo_directory.st_functions import st_button, load_css
|
25 |
+
|
26 |
+
|
27 |
+
#streamlit_analytics.start_tracking()
|
28 |
+
#with streamlit_analytics.track():
|
29 |
+
load_css()
|
30 |
+
|
31 |
+
col1, col2, col3 = st.columns(3)
|
32 |
+
col2.image(Image.open('Logo.png'))
|
33 |
+
|
34 |
+
|
35 |
+
st.header('Tracing Insights')
|
36 |
+
|
37 |
+
st.info("Home for F1 data-driven analytics, pre-race predictions, post-race analysis, dank memes you won't find anywhere else")
|
38 |
+
|
39 |
+
icon_size = 20
|
40 |
+
|
41 |
+
|
42 |
+
st_button('twitter', 'https://twitter.com/tracinginsights', 'Follow me on Twitter', icon_size)
|
43 |
+
st_button('newsletter', 'https://tracinginsights.substack.com/', 'Sign up for my Newsletter', icon_size)
|
44 |
+
st_button('', 'https://instagram.com/tracinginsights', 'Follow me on Instagram', icon_size)
|
45 |
+
st_button('', 'https://www.reddit.com/r/TracingInsights/', 'Join r/TracingInsights sub-reddit', icon_size)
|
46 |
+
st_button('', 'https://tracinginsights.creator-spring.com/', 'Shop Merch', icon_size)
|
47 |
+
st_button('', 'https://discord.gg/ZabvWFNQFz', 'Join Discord', icon_size)
|
48 |
+
st_button('youtube', 'https://www.youtube.com/@TracingInsights', 'Tracing Insights YouTube channel', icon_size)
|
49 |
+
st_button('cup', 'https://www.buymeacoffee.com/tracinginsights', 'Buy me a Coffee', icon_size)
|
50 |
+
st_button('', 'https://www.facebook.com/TracingInsights', 'Follow me on Facebook', icon_size)
|
51 |
+
st_button('', 'https://www.linkedin.com/company/tracinginsights', 'Follow me on LinkedIn', icon_size)
|
52 |
+
st_button('', 'https://www.patreon.com/tracinginsights', 'Patreon for exclusive content', icon_size)
|
53 |
+
st_button('', 'https://www.twitch.tv/tracinginsights', 'Follow me on Twitch', icon_size)
|
54 |
+
st_button('', 'https://clubhouse.com/@tracinginsights', 'Follow me on ClubHouse', icon_size)
|
55 |
+
|
56 |
+
st_button('', 'https://paypal.me/TracingInsights?country.x=IN&locale.x=en_GB', 'PayPal', icon_size)
|
57 |
+
|
58 |
+
|
59 |
+
st_button('', 'https://amazon.com/dp/B0BF2XK7Q6', 'Buy my Childrens book', icon_size)
|