import gradio as gr import request as r def askPrice(): res = r.request('https://orapiweb1.pttor.com/api/oilprice/LatestOilPrice') return res.json() #with gr.Blocks() as myApp: # with gr.Row(): # with gr.Column(scale=1): # with gr.Column(scale=1): app = gr.Interface(fn=askPrice, outputs='json')