Add files via upload #3
Merged
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.

Linted, started working on the uploader fixes.
Just dealing with UI issues
Pull Request Checklist
Before submitting your pull request, please review the following checklist:
Description
Key changes and explanations:
Repository Management: Added repo_exists_button, create_repo_button, and repo_status_label to the UI. These allow the user to check if a repo exists and create one. The associated check_repo_exists and create_repo methods use the Hugging Face Hub API to perform these actions.
File/Folder Selection:
Replaced the QListWidget with separate file and folder selection mechanisms.
Added select_file_button and selected_file_label for single file selection using QFileDialog.getOpenFileName.
Kept folder_select_button and folder_label for folder selection using QFileDialog.getExistingDirectory.
The upload_type_dropdown (with options "File" and "Folder") determines which selection method is displayed.
UI Updates: The update_ui_for_upload_type method now controls which selection widgets are visible based on the selected upload type.
Existence Checks: Before starting the upload, the start_upload method now checks if the selected file or folder exists using os.path.isfile and os.path.isdir, respectively. If the selected path does not exist, an error message is displayed, and the upload is aborted. These checks are also performed within the HFUploaderThread to prevent issues due to race conditions or external changes.
Error Handling: Added exist_ok = True to create_repo to allow existing repos. Error messages are now displayed using QMessageBox.critical for better user feedback.
Thread Safety: All potentially long-running operations (repo checking, creation, and uploading) remain in background threads, updating the UI through signals.