Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
import requests
|
3 |
import json
|
4 |
from datasets import load_dataset
|
@@ -15,7 +16,8 @@ def query1(fetch_url):
|
|
15 |
json_obj=response.json()
|
16 |
for obj in json_obj:
|
17 |
print (obj)
|
18 |
-
|
|
|
19 |
|
20 |
|
21 |
def query2(fetch_url,config="TEST",split="test",offset=0,length=10):
|
|
|
1 |
import gradio as gr
|
2 |
+
import pandas as pd
|
3 |
import requests
|
4 |
import json
|
5 |
from datasets import load_dataset
|
|
|
16 |
json_obj=response.json()
|
17 |
for obj in json_obj:
|
18 |
print (obj)
|
19 |
+
df = pd.DataFrame.from_dict(json_obj)
|
20 |
+
return df
|
21 |
|
22 |
|
23 |
def query2(fetch_url,config="TEST",split="test",offset=0,length=10):
|