import gradio as gr import requests as r def askPrice(test): 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,inputs='text', outputs='json')