mistermprah commited on
Commit
f731195
1 Parent(s): 13fdc8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -73,12 +73,11 @@ def predict_stock_price(ticker, open_price, high_price, low_price, close_price,
73
  buf.seek(0)
74
  plt.close()
75
 
76
- # Load the image from the buffer
77
- img = Image.open(buf)
78
 
79
  result = f"Predicted future price for {ticker}: ${next_day_lstm_price:.2f}"
80
 
81
- return result, img
82
  except Exception as e:
83
  return str(e)
84
 
@@ -110,7 +109,7 @@ iface = gr.Interface(
110
  gr.Number(label="Adj Close"),
111
  gr.Number(label="Volume")
112
  ],
113
- outputs=[gr.Textbox(), gr.Image(type="pil")],
114
  title="Stock Price Predictor",
115
  description="Select the stock ticker and input the last recorded values to predict the closing price using the LSTM model."
116
  )
 
73
  buf.seek(0)
74
  plt.close()
75
 
76
+
 
77
 
78
  result = f"Predicted future price for {ticker}: ${next_day_lstm_price:.2f}"
79
 
80
+ return result, buf
81
  except Exception as e:
82
  return str(e)
83
 
 
109
  gr.Number(label="Adj Close"),
110
  gr.Number(label="Volume")
111
  ],
112
+ outputs=[gr.Textbox(), gr.Image(type="file")],
113
  title="Stock Price Predictor",
114
  description="Select the stock ticker and input the last recorded values to predict the closing price using the LSTM model."
115
  )