Skip to content

Commit

Permalink
initial final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
junwha committed Apr 30, 2022
1 parent d169292 commit 11c1ff5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pages/resnet50.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@ const ImageModal: React.FC<{ mid: number }> = ({ mid }) => {
</label>
<h3 className="text-3xl font-bold">Select Image For Test</h3>
<div className="flex flex-col justify-start items-center mt-10 w-full">
{output && <h2>{output}</h2>}
{output && (
<>
<h2 className="card-title">Result: {output}</h2>
<button onClick={() => {
setOutput(null);
}} className="btn btn-link">Try Again</button>
</>
)}
{loading && <h2>Processing...</h2>}
{!loading &&
!output &&
Expand Down Expand Up @@ -356,10 +363,11 @@ const ResNet50 = () => {
data,
}
);
console.log(response.data)
setMid(response.data.mid);
timerRef.current = setInterval(() => {
axios
.get(`http://localhost:9080/status?mid=${mid}`)
.get(`http://localhost:9080/status?mid=${response.data.mid}`)
.then((res) => {
if (res.data.status !== "running") {
if (timerRef.current) {
Expand Down

0 comments on commit 11c1ff5

Please sign in to comment.