sonobit commited on
Commit
0a36955
1 Parent(s): bcf566a

Update app.py

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