bunarivenna commited on
Commit
acb7c67
·
verified ·
1 Parent(s): 0e0ffa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -19,8 +19,9 @@ async()=>{
19
  }
20
  """
21
 
22
- def get_ans("GOOG"):
23
  plt.close()
 
24
  tickers = yf.Tickers(inp)
25
  x = tickers.tickers[inp].history(period="15y")
26
  df = x
@@ -115,10 +116,10 @@ def get_ans("GOOG"):
115
  df3['Values'] = [i * the_max for i in df3['Values']]
116
  return plt, gr.update(visible=True,value=df, x="Date",y="Open", height=500, width=800),gr.update(visible=True,value=df[-300:], x="Date",y="Open", height=500, width=800),gr.update(visible=True,value=df[-30:], x="Date",y="Open", height=500, width=800), max(np.asarray(df['Open'])), min(np.asarray(df['Open'])), max(np.asarray(df['Open'])[-300:]), min(np.asarray(df['Open'][-300:])), max(np.asarray(df['Open'])[-30:]), min(np.asarray(df['Open'][-30:])), (max(np.asarray(df['Open']))) * (lst_output["Values"][0]), gr.update(visible=True,value=lst_output, x="index",y="Values", height=500, width=800), gr.update(visible=True,value=df3, x="index",y="Values", height=500, width=800), gr.update(visible=True,value=df3[-300:], x="index",y="Values", height=500, width=800)
117
 
118
- def get_seo("GOOG"):
119
  plt.close()
120
  time_step = 100
121
-
122
  tickers = yf.Tickers(inp)
123
  x = tickers.tickers[inp].history(period="15y")
124
  df = x
@@ -154,7 +155,8 @@ def get_seo("GOOG"):
154
 
155
  return gr.update(visible=True, value=z, x='index', y='Values', height=500, width=800), gr.update(visible=True, value=y[:100], x='index', y='Values', height=500, width=800), gr.update(visible=True, value=a, x='index', y='Values', height=500, width=800)
156
 
157
- def get_info("GOOG"):
 
158
  tickers = yf.Ticker(inp)
159
  info = tickers.info
160
  balance = tickers.balance_sheet
 
19
  }
20
  """
21
 
22
+ def get_ans():
23
  plt.close()
24
+ inp = "GOOG"
25
  tickers = yf.Tickers(inp)
26
  x = tickers.tickers[inp].history(period="15y")
27
  df = x
 
116
  df3['Values'] = [i * the_max for i in df3['Values']]
117
  return plt, gr.update(visible=True,value=df, x="Date",y="Open", height=500, width=800),gr.update(visible=True,value=df[-300:], x="Date",y="Open", height=500, width=800),gr.update(visible=True,value=df[-30:], x="Date",y="Open", height=500, width=800), max(np.asarray(df['Open'])), min(np.asarray(df['Open'])), max(np.asarray(df['Open'])[-300:]), min(np.asarray(df['Open'][-300:])), max(np.asarray(df['Open'])[-30:]), min(np.asarray(df['Open'][-30:])), (max(np.asarray(df['Open']))) * (lst_output["Values"][0]), gr.update(visible=True,value=lst_output, x="index",y="Values", height=500, width=800), gr.update(visible=True,value=df3, x="index",y="Values", height=500, width=800), gr.update(visible=True,value=df3[-300:], x="index",y="Values", height=500, width=800)
118
 
119
+ def get_seo():
120
  plt.close()
121
  time_step = 100
122
+ inp = "GOOG"
123
  tickers = yf.Tickers(inp)
124
  x = tickers.tickers[inp].history(period="15y")
125
  df = x
 
155
 
156
  return gr.update(visible=True, value=z, x='index', y='Values', height=500, width=800), gr.update(visible=True, value=y[:100], x='index', y='Values', height=500, width=800), gr.update(visible=True, value=a, x='index', y='Values', height=500, width=800)
157
 
158
+ def get_info():
159
+ inp = "GOOG"
160
  tickers = yf.Ticker(inp)
161
  info = tickers.info
162
  balance = tickers.balance_sheet