johnbradley's picture
Download file from dataset v2
efe37d4
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()