-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ai searching, animal list, public animal, save
- Loading branch information
1 parent
e202cb7
commit 4720e7b
Showing
38 changed files
with
1,867 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import dotenv from 'dotenv'; | ||
|
||
export default class AiBreedClassificationApi { | ||
public static async Predict(image: Blob) { | ||
const formData = new FormData(); | ||
formData.append('image', image); | ||
const url = process.env.AI_BREED_URL || ""; | ||
if (url) { | ||
const response = await fetch(url, { | ||
method: 'POST', | ||
body: formData, | ||
}); | ||
return await response.json(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.