Skip to content

Commit 1178aa2

Browse files
committed
Debug
1 parent 34d5f00 commit 1178aa2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
if SUPABASE_URL and SUPABASE_KEY:
2626
supabase: Client = create_client(SUPABASE_URL, SUPABASE_KEY)
27+
print("Supabase client connected")
2728
else:
2829
supabase = None
2930

@@ -53,7 +54,7 @@
5354
model: torch.nn.Module = None
5455

5556
def write_feedback_log(event: dict):
56-
is_new = not os.path.isfile(FEEDBACK_LOG)
57+
file_exists = os.path.isfile(FEEDBACK_LOG)
5758
with open(FEEDBACK_LOG, "a", newline="", encoding="utf-8") as f:
5859
writer = csv.DictWriter(
5960
f,
@@ -73,7 +74,7 @@ def write_feedback_log(event: dict):
7374
"event_name", "schema_version", "level", "profile_id"
7475
]
7576
)
76-
if is_new:
77+
if not file_exists:
7778
writer.writeheader()
7879
writer.writerow(event)
7980

0 commit comments

Comments
 (0)