Skip to content

Commit

Permalink
fix telugu text in bulk eval
Browse files Browse the repository at this point in the history
table header metric name in bulk eval
  • Loading branch information
devxpy committed Dec 11, 2023
1 parent 2f3922c commit 7311396
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions daras_ai_v2/vector_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,10 @@ def download_content_bytes(*, f_url: str, mime_type: str) -> tuple[bytes, str]:
return b"", ""
f_bytes = r.content
# if it's a known encoding, standardize to utf-8
if r.encoding:
encoding = r.apparent_encoding or r.encoding
if encoding:
try:
codec = codecs.lookup(r.encoding)
codec = codecs.lookup(encoding)
except LookupError:
pass
else:
Expand Down
2 changes: 1 addition & 1 deletion recipes/BulkEval.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _render_results(results: list[AggFunctionResult]):
counts = [d.get("count", 1) for d in g]
fig.add_trace(
go.Table(
header=dict(values=["Metric", "Value", "Count"]),
header=dict(values=["Metric", k.capitalize(), "Count"]),
cells=dict(
values=[columns, values, counts],
fill_color=["aliceblue", colors, "aliceblue"],
Expand Down

0 comments on commit 7311396

Please sign in to comment.