Skip to content

Commit

Permalink
removed setStanza
Browse files Browse the repository at this point in the history
  • Loading branch information
BustosAndrew committed Apr 22, 2023
1 parent 1fa682e commit ff6f703
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions comps/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,12 @@ export const Form = ({ input, outputHandler, toggleSubmitted }) => {
const transcribe = async () => {
if (input === "file") {
const formData = new FormData()
formData.append("file", file)
formData.append("file", file, file.name)

try {
const response = await fetch("/api/whisper", {
method: "POST",
body: formData,
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": true,
},
})
const { text, error } = await response.json()
if (response.ok) {
Expand All @@ -156,7 +152,6 @@ export const Form = ({ input, outputHandler, toggleSubmitted }) => {
const submitHandler = async (event) => {
event.preventDefault()
setIsLoading(true)
setStanzas(0)
setAlert(false)
const response = await fetch("/api/lyrics", {
method: "POST",
Expand Down

0 comments on commit ff6f703

Please sign in to comment.