Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
import requests
|
2 |
from datasets import load_dataset
|
3 |
|
4 |
-
dataset = load_dataset("nlphuji/flickr30k", split="test[10:20]")
|
5 |
-
print (dataset)
|
6 |
-
#train_10_20_ds = datasets.load_dataset("bookcorpus", split="train[10:20]")
|
7 |
|
8 |
#headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
9 |
API_URL1 = "https://datasets-server.huggingface.co/splits?dataset=nlphuji/flickr30k"
|
@@ -15,7 +14,7 @@ data = query1()
|
|
15 |
print (data)
|
16 |
|
17 |
|
18 |
-
API_URL2 = "https://datasets-server.huggingface.co/rows?dataset=nlphuji/flickr30k&config=
|
19 |
def query2():
|
20 |
response = requests.get(API_URL2)
|
21 |
return response.json()
|
|
|
1 |
import requests
|
2 |
from datasets import load_dataset
|
3 |
|
4 |
+
#dataset = load_dataset("nlphuji/flickr30k", split="test[10:20]")
|
5 |
+
#print (dataset)
|
|
|
6 |
|
7 |
#headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
8 |
API_URL1 = "https://datasets-server.huggingface.co/splits?dataset=nlphuji/flickr30k"
|
|
|
14 |
print (data)
|
15 |
|
16 |
|
17 |
+
API_URL2 = "https://datasets-server.huggingface.co/rows?dataset=nlphuji/flickr30k&config=TEST&split=test&offset=150&length=10"
|
18 |
def query2():
|
19 |
response = requests.get(API_URL2)
|
20 |
return response.json()
|