awacke1 commited on
Commit
15c1de2
·
1 Parent(s): 66c145a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -8,6 +8,12 @@ import hashlib
8
  import json
9
 
10
  EXCLUDED_FILES = ['app.py', 'requirements.txt', 'pre-requirements.txt', 'packages.txt', 'README.md','.gitattributes', "backup.py","Dockerfile"]
 
 
 
 
 
 
11
 
12
  # Create a history.json file if it doesn't exist yet
13
  if not os.path.exists("history.json"):
@@ -88,8 +94,17 @@ def get_download_link(file):
88
 
89
  def main():
90
  st.sidebar.title('Web Datasets Bulk Downloader')
91
- url = st.sidebar.text_input('Please enter a Web URL to bulk download text and files')
92
 
 
 
 
 
 
 
 
 
 
 
93
  # Load history
94
  with open("history.json", "r") as f:
95
  history = json.load(f)
 
8
  import json
9
 
10
  EXCLUDED_FILES = ['app.py', 'requirements.txt', 'pre-requirements.txt', 'packages.txt', 'README.md','.gitattributes', "backup.py","Dockerfile"]
11
+ URLS = {
12
+ "Chordify - Play Along Chords": "https://chordify.net/",
13
+ "National Guitar Academy - Guitar Learning": "https://www.guitaracademy.com/",
14
+ "Ultimate Guitar - Massive Song Database": "https://www.ultimate-guitar.com/",
15
+ # ... Add other URLs here
16
+ }
17
 
18
  # Create a history.json file if it doesn't exist yet
19
  if not os.path.exists("history.json"):
 
94
 
95
  def main():
96
  st.sidebar.title('Web Datasets Bulk Downloader')
 
97
 
98
+ # Option to choose between entering URL or selecting from dropdown
99
+ url_input_method = st.sidebar.radio("Choose URL Input Method", ["Enter URL", "Select from List"])
100
+
101
+ url = ""
102
+ if url_input_method == "Enter URL":
103
+ url = st.sidebar.text_input('Please enter a Web URL to bulk download text and files')
104
+ else:
105
+ selected_site = st.sidebar.selectbox("Select a Website", list(URLS.keys()))
106
+ url = URLS[selected_site]
107
+
108
  # Load history
109
  with open("history.json", "r") as f:
110
  history = json.load(f)