We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34d5f00 commit 1178aa2Copy full SHA for 1178aa2
app.py
@@ -24,6 +24,7 @@
24
25
if SUPABASE_URL and SUPABASE_KEY:
26
supabase: Client = create_client(SUPABASE_URL, SUPABASE_KEY)
27
+ print("Supabase client connected")
28
else:
29
supabase = None
30
@@ -53,7 +54,7 @@
53
54
model: torch.nn.Module = None
55
56
def write_feedback_log(event: dict):
- is_new = not os.path.isfile(FEEDBACK_LOG)
57
+ file_exists = os.path.isfile(FEEDBACK_LOG)
58
with open(FEEDBACK_LOG, "a", newline="", encoding="utf-8") as f:
59
writer = csv.DictWriter(
60
f,
@@ -73,7 +74,7 @@ def write_feedback_log(event: dict):
73
74
"event_name", "schema_version", "level", "profile_id"
75
]
76
)
- if is_new:
77
+ if not file_exists:
78
writer.writeheader()
79
writer.writerow(event)
80
0 commit comments