Omnibus commited on
Commit
9265cc1
1 Parent(s): 3c99043

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -7,8 +7,10 @@ from datasets import load_dataset
7
  #print (dataset)
8
 
9
  #headers = {"Authorization": f"Bearer {API_TOKEN}"}
10
- def query1():
11
- API_URL1 = "https://datasets-server.huggingface.co/splits?dataset=nlphuji/flickr30k"
 
 
12
  response = requests.get(API_URL1)
13
  #response = requests.get(API_URL1, headers=headers)
14
  return response.json()
 
7
  #print (dataset)
8
 
9
  #headers = {"Authorization": f"Bearer {API_TOKEN}"}
10
+ def query1(fetch_url):
11
+ if fetch_url=="":
12
+ fetch_url = "nlphuji/flickr30k"
13
+ API_URL1 = f"https://datasets-server.huggingface.co/splits?dataset={fetch_url}"
14
  response = requests.get(API_URL1)
15
  #response = requests.get(API_URL1, headers=headers)
16
  return response.json()