Spaces:
Runtime error
Runtime error
remove redundant logging
Browse files
app.py
CHANGED
@@ -87,19 +87,6 @@ def send_report(sample, dataset, reason, annotator, campaign):
|
|
87 |
else:
|
88 |
sample_id = sample["id"]
|
89 |
|
90 |
-
print("submitting")
|
91 |
-
pprint(
|
92 |
-
{
|
93 |
-
"dataset": dataset,
|
94 |
-
"docid": sample_id,
|
95 |
-
"text": text,
|
96 |
-
"metadata": sample,
|
97 |
-
"reason": reason,
|
98 |
-
"annotator": annotator,
|
99 |
-
"campaign": campaign,
|
100 |
-
"timestamp": str(datetime.now()),
|
101 |
-
}
|
102 |
-
)
|
103 |
with jsonlines.open("report.jsonl", "w") as f:
|
104 |
f.write(
|
105 |
{
|
@@ -113,7 +100,7 @@ def send_report(sample, dataset, reason, annotator, campaign):
|
|
113 |
"timestamp": str(datetime.now()),
|
114 |
}
|
115 |
)
|
116 |
-
|
117 |
api = HfApi()
|
118 |
api.upload_file(
|
119 |
path_or_fileobj="report.jsonl",
|
|
|
87 |
else:
|
88 |
sample_id = sample["id"]
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
with jsonlines.open("report.jsonl", "w") as f:
|
91 |
f.write(
|
92 |
{
|
|
|
100 |
"timestamp": str(datetime.now()),
|
101 |
}
|
102 |
)
|
103 |
+
|
104 |
api = HfApi()
|
105 |
api.upload_file(
|
106 |
path_or_fileobj="report.jsonl",
|