feat: remove all print

This commit is contained in:
akhdanre 2025-05-21 22:15:04 +07:00
parent ff58f79bc3
commit 44659395ee
4 changed files with 9 additions and 10 deletions

Binary file not shown.

View File

@ -19,12 +19,13 @@ class SocketController:
def _register_events(self):
@self.socketio.on("connect")
def on_connect():
print(f"Client connected: {request.sid}")
# print(f"Client connected: {request.sid}")
emit("connection_response", {"status": "connected", "sid": request.sid})
@self.socketio.on("disconnect")
def on_disconnect():
print(f"Client disconnected: {request.sid}")
# print(f"Client disconnected: {request.sid}")
pass
@self.socketio.on("join_room")
def handle_join_room(data):

View File

@ -31,7 +31,7 @@ class NERSRLRepository:
def predict_sentence(self, sentence: str) -> dict:
tokens = re.findall(r"\d{1,2}\.\d{2}|\w+|[^\w\s]", sentence.lower())
print(tokens)
seq_padded = self._preprocess_tokens(tokens)
pred_ner_prob, pred_srl_prob = self.model.predict(seq_padded, verbose=0)

View File

@ -149,7 +149,6 @@ class SessionService:
time.sleep(2)
for q in questions:
print(f"\nMengirim pertanyaan {q.index} ke room {session_id}")
question_to_send = q.model_dump(exclude={"target_answer"})
@ -202,7 +201,6 @@ class SessionService:
is_correct = self._is_correct(question, answer)
print(answer)
self.answer_redis_repository.save_user_answer(
session_id=session_id,
user_id=user_id,
@ -257,11 +255,11 @@ class SessionService:
else:
result = False
# Print informasi evaluasi
print(f"Tipe Soal: {q.type}")
print(f"Jawaban User: {ans}")
print(f"Jawaban Benar: {q.target_answer}")
print(f"Hasil: {'Benar' if result else 'Salah'}\n")
# # Print informasi evaluasi
# print(f"Tipe Soal: {q.type}")
# print(f"Jawaban User: {ans}")
# print(f"Jawaban Benar: {q.target_answer}")
# print(f"Hasil: {'Benar' if result else 'Salah'}\n")
return result