-
Notifications
You must be signed in to change notification settings - Fork 53
Update the Aesthetic score endpoint to by based on Composition #703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
danactive
wants to merge
14
commits into
main
Choose a base branch
from
feature/score
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
86f95fb
feat(Aesthetic > Composition): Boost visual-interest scaling, sharpen…
danactive 6481948
feat(Edit > Album): Yellow highlight during editing
danactive e70cf1c
feat(Aesthetic > Composition): Tool tip of the Composition breakdown
danactive 1bd6b41
chore(Performance): Dynamic imports and useCallbacks
danactive dbd3988
fix(Bookmark Button): Add unit test
danactive 4632014
feat(Admin > Walk): Rename file with exact filename (or YYYY-MM-DD or…
danactive 599a89a
feat(View Persons): Clear per chip
danactive b4ebf7c
fix(View Persons): All people dropdown allows easy changing
danactive 14b7231
feat(useSearch): Display Map filter or keyword filters as chips
danactive 80d3af9
feat(useSearch): Operators and or are in chips
danactive dcda68c
chore(package): Update deps to minor
danactive d2ccab7
Add Python docs
danactive 0e00220
stablize
danactive c227554
chore(e2e): All tests pass
danactive File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,48 @@ | ||
| # Apps Quick Start (Python API) | ||
|
|
||
| This folder contains the Python API used by the app. | ||
|
|
||
| ## Routes you likely want | ||
|
|
||
| - `POST /scores` | ||
| - `POST /classify` | ||
|
|
||
| Both accept raw image bytes (`image/jpeg` or `image/png`). | ||
|
|
||
| ## Start the API (recommended via Docker) | ||
|
|
||
| From repo root: | ||
|
|
||
| ```sh | ||
| make build-ai-api | ||
| make ai-api | ||
| ``` | ||
|
|
||
| API runs at: | ||
|
|
||
| ```txt | ||
| http://localhost:8080 | ||
| ``` | ||
|
|
||
| ## Test the two routes | ||
|
|
||
| Use any local image file (example: `public/sample.jpg`). | ||
|
|
||
| ```sh | ||
| curl -X POST -H "Content-Type: image/jpeg" --data-binary @public/sample.jpg http://localhost:8080/scores | ||
| ``` | ||
|
|
||
| ```sh | ||
| curl -X POST -H "Content-Type: image/jpeg" --data-binary @public/sample.jpg http://localhost:8080/classify | ||
| ``` | ||
|
|
||
| ## Optional: run without Docker | ||
|
|
||
| ```sh | ||
| cd apps/api | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
| pip install -r requirements.txt | ||
| uvicorn main:main_py_app --host 0.0.0.0 --port 8080 | ||
| ``` | ||
|
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -6,4 +6,5 @@ scikit-learn==1.5.0 | |
| timm==1.0.15 | ||
| torch==2.0.1 | ||
| torchvision==0.15.2 | ||
| transformers==4.38.2 | ||
| uvicorn==0.34.3 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.