import React, { useState } from "react"; export default function App() { const [input, setInput] = useState(""); const [prediction, setPrediction] = useState(""); const handlePredict = async () => { const res = await fetch("/api/predict", { method: "POST", body: JSON.stringify({ input }), headers: { "Content-Type": "application/json" } }); const data = await res.json(); setPrediction(data.prediction); }; return (

Stock Price Forecaster (LSTM)

setInput(e.target.value)} style={{ padding: "0.5rem", width: "300px" }} /> {prediction &&

Predicted Next Day Close: ${prediction}

}
); }