jsebdev commited on
Commit
0e5c662
1 Parent(s): 2492ec9

Implement model after mock predict

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. utils.py +2 -1
app.py CHANGED
@@ -45,7 +45,7 @@ with gr.Blocks() as demo:
45
  min_text,
46
  next_close_text
47
  ]
48
- # predict_button.click(lambda: predict(data), outputs=outputs)
49
- predict_button.click(lambda: predict_mock(data), outputs=outputs)
50
 
51
  demo.launch(debug=True)
 
45
  min_text,
46
  next_close_text
47
  ]
48
+ predict_button.click(lambda: predict(data), outputs=outputs)
49
+ # predict_button.click(lambda: predict_mock(data), outputs=outputs)
50
 
51
  demo.launch(debug=True)
utils.py CHANGED
@@ -5,6 +5,7 @@ import datetime as dt
5
  import yfinance as yfin
6
  import os
7
 
 
8
 
9
 
10
  def get_data(ticker='AAPL', start=None, end=None):
@@ -75,7 +76,7 @@ def preprocessing(data):
75
 
76
 
77
  # Model prediction
78
- # model = from_pretrained_keras("jsebdev/apple_stock_predictor")
79
  def predict(data):
80
  input, decoder = preprocessing(data)
81
  print("input")
 
5
  import yfinance as yfin
6
  import os
7
 
8
+ from huggingface_hub import from_pretrained_keras
9
 
10
 
11
  def get_data(ticker='AAPL', start=None, end=None):
 
76
 
77
 
78
  # Model prediction
79
+ model = from_pretrained_keras("jsebdev/apple_stock_predictor")
80
  def predict(data):
81
  input, decoder = preprocessing(data)
82
  print("input")