File size: 397 Bytes
bc8fe8b
951ca42
 
 
efe37d4
 
951ca42
 
 
bc8fe8b
 
951ca42
bc8fe8b
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import json
from huggingface_hub import hf_hub_download

path = hf_hub_download(repo_id="johnbradley/Test-Dataset", filename="data.json", repo_type="dataset")
with open(path) as infile:
   data = json.load(infile)
print(data)


def greet(name):
    return "Hello " + name + "!!" + data.get("secret")

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()