Skip to content

Commit

Permalink
Merge pull request #10 from Neo-Zenith/main
Browse files Browse the repository at this point in the history
pull main
  • Loading branch information
woonyee28 authored Jan 20, 2024
2 parents 81e18da + 1b9266e commit 9e57c10
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 171 deletions.
34 changes: 17 additions & 17 deletions client/src/components/Output/Output.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ import OutputWindow from "../OutputWindow/OutputWindow";
import { io } from "socket.io-client";

export default function Output() {
const [context, setContext] = useState(""); // Assuming context is a string
const [context, setContext] = useState(""); // Assuming context is a string

// Establish WebSocket connection
const socket = io("http://127.0.0.1:5000");
// Establish WebSocket connection
const socket = io("http://127.0.0.1:5000");

// client-side
socket.on("connect", () => {
console.log(socket.id);
});
// client-side
socket.on("connect", () => {
console.log(socket.id);
});

socket.on("disconnect", () => {
console.log(socket.id); // undefined
});
socket.on("disconnect", () => {
console.log(socket.id); // undefined
});

socket.on("new-output", (data) => {
console.log("getting new output");
console.log(data);
// setContext((prev) => prev + data);
});
socket.on("new-output", (data) => {
console.log("getting new output");
console.log(data);
// setContext((prev) => prev + data);
});

useEffect(() => {}, []); // Run this effect only once when the component mounts
useEffect(() => {}, []); // Run this effect only once when the component mounts

return <OutputWindow context={context} />;
return <OutputWindow context={context} />;
}
3 changes: 0 additions & 3 deletions server/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions server/README.md

This file was deleted.

57 changes: 0 additions & 57 deletions server/app.py

This file was deleted.

69 changes: 0 additions & 69 deletions server/gpt_predictor.py

This file was deleted.

Empty file removed server/requests.rest
Empty file.
Binary file removed server/requirements.txt
Binary file not shown.

0 comments on commit 9e57c10

Please sign in to comment.