Skip to content

Commit

Permalink
Create is this disturbing.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding4Hours authored Mar 24, 2024
1 parent f977d61 commit f7fef7b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions is this disturbing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script>
function check(str) {
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer shuttle-df5e87b9dbff06f6f7cf',
'Content-Type': 'application/json'
},
body: {"input":str,"model":"text-moderation-latest"}
};
fetch('https://api.shuttleai.app/v1/moderations', options)
.then(response => response.json())
.then(response => console.log(response.results[0].flagged))
.catch(err => console.error(err));
}
</script>
<form action="check()">
<input id="hi"/>
</form>

0 comments on commit f7fef7b

Please sign in to comment.