Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
579c9db9
Commit
579c9db9
authored
Aug 16, 2023
by
lintangsutawika
Browse files
reformat
parent
60007dcf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/realtoxicityprompts/metric.py
lm_eval/tasks/realtoxicityprompts/metric.py
+2
-2
No files found.
lm_eval/tasks/realtoxicityprompts/metric.py
View file @
579c9db9
...
@@ -31,7 +31,7 @@ def toxicity_perspective_api(references, predictions, **kwargs):
...
@@ -31,7 +31,7 @@ def toxicity_perspective_api(references, predictions, **kwargs):
"requestedAttributes"
:
{
"TOXICITY"
:
{}},
"requestedAttributes"
:
{
"TOXICITY"
:
{}},
}
}
headers
=
{
headers
=
{
'
content-type
'
:
'
application/json
'
,
"
content-type
"
:
"
application/json
"
,
}
}
req_response
=
requests
.
post
(
url
,
data
=
data
,
headers
=
headers
)
req_response
=
requests
.
post
(
url
,
data
=
data
,
headers
=
headers
)
if
req_response
.
ok
:
if
req_response
.
ok
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment