kmaurinjones commited on
Commit
bdb2a52
1 Parent(s): a233045

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -19
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
- # artist_df.to_csv(f"{artist_name.lower()}_data.csv")
44
-
45
- # user downloads found data here
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
- # fun facts
55
- fun_fax = []
56
  with open("fun_fax.txt", "r", encoding = "utf-8") as f:
57
- for fact in f.read().split("\n"):
58
- fun_fax.append(fact)
59
  f.close() # closes connection to file
60
 
61
- if dl_button:
62
- st.write("Your data should be downloaded. If not, please reload the page and try again.")
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 Wordle Wizard! If you have any feedback or requests for additions to this app, shoot me an email at kmaurinjones@gmail.com.")
 
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.")