Updated sample to use BSRGAN model from HF hub, and UV for dependency management#153
Closed
Ankur-singh wants to merge 3 commits intointel:mainfrom
Ankur-singh:use-BSRGAN-from-hf
Closed
Updated sample to use BSRGAN model from HF hub, and UV for dependency management#153Ankur-singh wants to merge 3 commits intointel:mainfrom Ankur-singh:use-BSRGAN-from-hf
Ankur-singh wants to merge 3 commits intointel:mainfrom
Ankur-singh:use-BSRGAN-from-hf
Conversation
lgurav
suggested changes
Mar 13, 2025
| from network_rrdbnet import RRDBNet | ||
|
|
||
|
|
||
| def download_from_hub(repo_id, hf_token=None): |
Contributor
There was a problem hiding this comment.
Please add docstring, return type and argument type for repo_id
|
|
||
|
|
||
| class BSRGAN: | ||
| def __init__(self, model_path, device, hf_model=False): |
Contributor
There was a problem hiding this comment.
Please add docstring and argument type for model_path and device
|
|
||
| self.load_model() | ||
|
|
||
| def load_model(self): |
Contributor
There was a problem hiding this comment.
Please add docstring, return type if any
| self.model_name = model_name | ||
| self.model = model | ||
|
|
||
| def predict(self, img_path): |
Contributor
There was a problem hiding this comment.
Please add docstring, return type and argument type for img_path
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR includes the following changes:
pixiwhich was previously used for dependency management