Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
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()
|