Spaces:
Sleeping
Sleeping
kmaurinjones
commited on
Commit
•
bdb2a52
1
Parent(s):
a233045
Update app.py
Browse files
app.py
CHANGED
@@ -40,28 +40,19 @@ else:
|
|
40 |
delay = (delay_min, delay_max), # random float value between (delay_min, delay_max) seconds
|
41 |
print_progress = True)
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
# if find_button:
|
47 |
-
dl_button = st.download_button('Download Data', artist_df, f"{artist_name.lower()}_data.csv")
|
48 |
-
# st.download_button('Download Data', DATA_TO_CSV) # Defaults to 'text/plain'
|
49 |
-
|
50 |
-
# with open(f'{artist_name.lower()}_data.csv') as f:
|
51 |
-
# st.download_button('Download CSV', f) # Defaults to 'text/plain'
|
52 |
-
# st.write("Your data should now be downloading.")
|
53 |
|
54 |
-
#
|
55 |
-
|
56 |
with open("fun_fax.txt", "r", encoding = "utf-8") as f:
|
57 |
-
for
|
58 |
-
|
59 |
f.close() # closes connection to file
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
st.write(fun_fax[random.randint(0, len(fun_fax) - 1)])
|
65 |
|
66 |
# "thank you" blurb
|
67 |
-
st.write("\nThanks for checking out
|
|
|
40 |
delay = (delay_min, delay_max), # random float value between (delay_min, delay_max) seconds
|
41 |
print_progress = True)
|
42 |
|
43 |
+
dl_button = st.download_button('Download Data', artist_df, f"{artist_name.lower()}_data.csv")
|
44 |
+
if dl_button:
|
45 |
+
st.write("Your data should be downloaded. If not, please reload the page and try again.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
+
# funnies
|
48 |
+
funnies = []
|
49 |
with open("fun_fax.txt", "r", encoding = "utf-8") as f:
|
50 |
+
for funny in f.read().split("\n"):
|
51 |
+
funnies.append(fact)
|
52 |
f.close() # closes connection to file
|
53 |
|
54 |
+
# print one fun fact
|
55 |
+
st.write(funnies[random.randint(0, len(fun_fax) - 1)])
|
|
|
|
|
56 |
|
57 |
# "thank you" blurb
|
58 |
+
st.write("\nThanks for checking out SongScope! If you have any feedback or requests for additions to this app, shoot me an email at kmaurinjones@gmail.com.")
|