sonobit commited on
Commit
83a296f
1 Parent(s): 84cc53e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import request as r
3
+
4
+ def askPrice():
5
+ res = r.request('https://orapiweb1.pttor.com/api/oilprice/LatestOilPrice')
6
+ return res.json()
7
+
8
+ #with gr.Blocks() as myApp:
9
+ # with gr.Row():
10
+ # with gr.Column(scale=1):
11
+ # with gr.Column(scale=1):
12
+
13
+ app = gr.Interface(fn=askPrice, outputs='json')