Oil-price / app.py
sonobit's picture
Create app.py
83a296f
raw
history blame
339 Bytes
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')