radames commited on
Commit
75e590a
·
1 Parent(s): 5553adb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -3,17 +3,14 @@ import numpy as np
3
  import talib
4
 
5
 
6
- def update(name):
7
  close = np.random.random(100)
8
  output = talib.SMA(close)
9
  return output
10
 
11
  with gr.Blocks() as demo:
12
- gr.Markdown("Start typing below and then click **Run** to see the output.")
13
- with gr.Row():
14
- inp = gr.Textbox(placeholder="What is your name?")
15
- out = gr.Textbox()
16
  btn = gr.Button("Run")
17
- btn.click(fn=update, inputs=inp, outputs=out)
18
 
19
  demo.launch()
 
3
  import talib
4
 
5
 
6
+ def run():
7
  close = np.random.random(100)
8
  output = talib.SMA(close)
9
  return output
10
 
11
  with gr.Blocks() as demo:
12
+ out = gr.JSON()
 
 
 
13
  btn = gr.Button("Run")
14
+ btn.click(fn=run, inputs=None, outputs=out)
15
 
16
  demo.launch()