-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b7a08b
commit dc5677d
Showing
8 changed files
with
137 additions
and
151 deletions.
There are no files selected for viewing
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,6 @@ | ||
{ | ||
"[rust]": { | ||
"editor.defaultFormatter": "rust-lang.rust-analyzer", | ||
"editor.formatOnSave": true | ||
} | ||
} |
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,3 @@ | ||
indent_style = "Block" | ||
reorder_imports = true | ||
max_width = 130 |
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
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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
use std::path::PathBuf; | ||
use anyhow::Result; | ||
use app_dirs2::{AppInfo, AppDataType, app_root}; | ||
use app_dirs2; | ||
use app_dirs2::{app_root, AppDataType, AppInfo}; | ||
use std::path::PathBuf; | ||
|
||
pub const APP_NAME: &str = "ruscribe"; | ||
pub const URL: &str = "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-medium.bin?download=true"; | ||
pub const FILENAME: &str = "ggml-medium.bin"; | ||
pub const HASH: &str = ""; // TODO | ||
pub const APP_INFO: AppInfo = AppInfo { | ||
name: "ruscribe", | ||
author: "github.com/thewh1teagle", | ||
author: "github.com.thewh1teagle", | ||
}; | ||
|
||
|
||
pub fn get_model_path() -> Result<PathBuf> { | ||
let app_config = app_root(AppDataType::UserData, &APP_INFO)?; | ||
let filepath = app_config.join(FILENAME); | ||
let filepath = app_config.join(FILENAME); | ||
Ok(filepath) | ||
} |
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.