02dad28
1
2
3
4
5
6
7
8
9
10
11
import json import gradio as gr def save_json(text): with open("output.json", "w") as outfile: json.dump(text, outfile) return "output.json" demo = gr.Interface(save_text_as_json, "text", "file") demo.launch()